I am developing a web application and need to check diskspace from the web application before allowing a user to upload files. i tried using system("df -h") and nohing is being displayed in the browser. how can i get the output of system commands displayed in the browser
try this:
$readout = system("df -h", $returnval); echo "Return Value: $returnval -- (if greater than 0, you have a problem)<br>\n"; echo "Last Line of Output: $last_line<br><br>\n";
here is the output from my browser Return Value: 127 Last Line of Output: when i use the getenv function the environment variable is displayed. How can i get the system command working?