I am using macbook-pro, and i am executing this php script using apache server, but i am not getting the output of exec() function. It is not even showing any error. Can anyone tell me how to get the output. Thanks in advance.
<html>
<head>
<title>Online PHP Script Execution</title>
</head>
<body>
<?php
echo "<h1>Hello, PHP!</h1>";
echo exec('java -version');
?>
</body>
</html>