RE: [PHP-WIN] Exec command still doesn't on Win2K and IIS
| From: | choiks | Date: | Fri, 29 Jun 2001 23:51:46 +0000 |
| Subject: | RE: [PHP-WIN] Exec command still doesn't on Win2K and IIS | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-8112@lists.php.net to get a copy of this message | ||
zzmostafa.bamha@francetelecom.com (BAMHA Mostafa Ftmms) wrote in
news:6F80F42D4777D4119359001083FCBB9E138CF2@ISSYNTSF02:
> The program i tested is very simple. This is the php code
><?
> echo "test ...";
> exec("dir c:\\");
> ?>
> ##################
you can't find dir.exe, dir.com, dir.bat in path of your computer.
"dir" is a command of cmd.exe or command.com
if your system is a NT compatible,
then source code is exec("cmd /c dir c:\\' );
but this result is not displayed.
exec() parameter must exist.
rewriten source
exec( "cmd /c dir c:\\", $b);
for ( $i=0;$i<sizeof($b);$i++ ) {
echo htmlspecialchars(trim($b[$i]))."<br>";
}