I'm running a simple wget
command in shell_exec()
wget_file.php
<?php
$command = "wget http://mydomain.co/media/bigbigbig.wav";
$output = shell_exec($command);
echo $output;
?>
According to http://www.php.net/shell_exec I can possibly expect an output: "The output from the executed command or NULL if an error occurred or the command produces no output."
If I run wget_file.php from the command line, I'll see a display of the wget results. However, if I run it from a browser, no result is given. (but the file does indeed download successfully)
I plan to execute the wget_file.php by calling via cUrl
, while passing the url + path.
But would be nice to get a response from the shell_exec()
, after execution is completed.
Does anyone know if I'm just missing something to get an output (running in the browser)?