Simple system call in PHP dosn't work on Windows Box???
Posted: Mon Feb 06, 2006 2:33 pm
I have the following simple code and it dosn't work on a WIN2003 server, but it does work on a linux box??? Any ideas???
I am just trying to list the contents of the current directory, where the script resides?? Can't seem to figure out why it won't execute my shell command?
Any help anyone can give me would be greatly appreciated.
Thanks,
Brad
I am just trying to list the contents of the current directory, where the script resides?? Can't seem to figure out why it won't execute my shell command?
Code: Select all
<html>
<head>
<title>Untitled</title>
</head>
<body>
<?php
echo '<pre>';
$last_line = system("dir *.*", $retval);
echo '
</pre>
<hr />Last line of the output: ' . $last_line . '
<hr />Return value: ' . $retval;
?>
</body></html>Thanks,
Brad