Hello!
I want to use exec to execute a shoutcast server in c:\shoutcast\sc_serv.exe on my Windows server 2003 IIS server. So I use this code
PHP Code:
<?php exec("c:\shoutcast\sc_serv.exe"); ?>
It does execute the program, however, it's making the target of the program c:\windows\system32. Seeing as the configuration file for the sc_serv.exe is in c:\shoutcast\sc_serv.exe, it cannot find the configuration file. I need to somehow tell PHP that I want it to launch sc_serv.exe but with a target of d:\shoutcast ..
So I tried this:
PHP Code:
<?php shell_exec("cd c:\shoutcast"); shell_exec("sc_serv.exe"); ?>
But it executed it both commands as if it opened CMD, ran the first command, closed CMD, opened a NEW CMD and ran the last command. It didn't work.
If anyone could help me, I would REALLY appreciate it!
|