I tried running this code as a test and it did not work. Any ideas?
<? exec("copy R:\Content\AD\GoldenPalace\wav\gpalace.wav R:\Content\AD\GoldenPalace\wav\rob.wav"); ?>
I have the latest version of cgi PHP installed on IIS 2k and tested to make sure php is running properly. HELP!
-=Mike
Why not use copy() ?
<? copy("r:/gpalace.wav","r:/rob.wav"); ?>
course you need to make sure PHP has permission to write to that dir was well but its alot easier then exitting to the shell
btw: the above works with IIS under XP
Ok so that does work. Thanks. But I am trying to run an exec command and pass parameters into it. For example:
<? exec("c:\encoder.bat -input ? -output ?") ?>
Any Ideas?
Try this:
$command = "c:\encoder.bat ... ";
popen($command, 'w');
That works for me.
W(2k)AMP
I'm attempting the same thing sort of. I have a small program that outputs the currently playing song in winamp to a file. the program is song.exe. I have tried exec() system_exec() and the above mentioned popen(). None will cause the program to run. I'm not sure what i'm doing wrong, any help would be great. (php 4.1.1 Apache 2.0.32).