I have executed this script under xampp ( ubuntu ) it works fine. but when i tried to execute it under windows it gives me no error but also no output.
<?
$command='ls -l';
$output = shell_exec($command);
echo $output;
?>
PHP do not run in save mode. what is the problem ? is it depending on the OS ?
This is because ls is unix based command and is not available on Windows
Not showing errors is because shell_exec only outputs STDOUT and not STDERR, if you want to be able to view error you can run your command like this:
which will show an error stating that ls was not found or something similar
in windows instead of ls you can run dir
this might help: