coolant Posted February 21, 2007 Share Posted February 21, 2007 If I run the following code.. <? exec("dir",$results); $count=count($results); for($i=0;$i<$count;$i++) { print "$results[$i]<br>"; } ?> and it works. It produces "Directory of C:\Inetpub\www.domain.com\windows" which is where the index.php (the code above) is located. So it's not a problem of giving cmd.exe permissions and all that "fun" stuff. I am trying to run the following code which works in the command line - "C:\Program Files\WebShot\webshotcmd.exe" /url www.yahoo.com How would I do this? Thanks! Link to comment https://forums.phpfreaks.com/topic/39435-exec-iis7/ Share on other sites More sharing options...
coolant Posted February 21, 2007 Author Share Posted February 21, 2007 After looking over some more sites, I tried... <? $command = "\"C:\\Program Files\\WebShot\\webshotcmd.exe\" /url www.yahoo.com\""; exec('$command',$results); $count=count($results); for($i=0;$i<$count;$i++) { print "$results[$i]<br>"; } ?> ... still no luck. Link to comment https://forums.phpfreaks.com/topic/39435-exec-iis7/#findComment-190282 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.