Hi,
I have installed PHP4 under Windows NT 4.0 / IIS 4.0. Unlike PHP under Rad Hat 7.0, I cannot capture the output of external programs to send to the user.
If I try any of the following code fragments I get nothing between the ">>>>>><<<<<<".
Any ideas? ">>>>>><<<<<<" is returned to a browser and then it hangs. Some silly installation problem??
What I really want to do is use cygwin find command with grep and pipe the output to the user.
<?php
print (">>>>>>>>>>");
// ---------------
readfile('c:\autoexec.bat');
// ---------------
passthru('C:\WINNT\system32\Ping.exe');
// ---------------
$cur_date = C:\WINNT\system32\Ping.exe;
print ("$cur_date");
// ---------------
exec('c:/cygwin/bin/date.exe', $output);
print implode('\n', $output);
// ---------------
$pp = popen("c:/cygwin/bin/date.exe 2>&1", "r")
or die("cannot fork");
while ($line = fgets($pp, 1024)) {
print ("$line<br>") or die("cannot print");
}
pclose($pp);
// ---------------
print ("<<<<<<<<<<<");
?>
End