[PHP] exec() under win2000 apache not works?
Hi! My problem is: I'm traying to use the following commandos under win2000 / apache / php4.0.6: ? // for testing if CMD works or not: $cmd_commando = cmd /c echo My Name is Adrian; passthru($cmd_commando); // the 'hot' commando for CMD: $cmd_commando = cmd /c xcopy C:\php\INPUT\* C:\php\OUTPUT\* /w /f /i /s /e /h /y; passthru($cmd_commando); ? Actualy the first 'test'-commando response the defined text 'My Name is Adrian' ... so far so good. But if i have a look on my Windows-Explorer for checking the Directory and files under 'C:\php\OUTPUT\*', (there shut be the same structure as in the 'C:\php\INPUT\*')there is nothing. Also i used the following methodes without any success: 'shell_exec();' and 'system();'. Where am i wrong or what shut i do for success?? Thanx for your answer! Greatings --- Adrian Christen / [EMAIL PROTECTED]
Re: [PHP] exec() under win2000 apache not works?
Posteingang [EMAIL PROTECTED] wrote: $cmd_commando = cmd /c xcopy C:\php\INPUT\* C:\php\OUTPUT\* /w /f /i /s /e /h /y; You need to escape your backslashes... $cmd_commando = cmd /c xcopy C:\\php\\INPUT\\* C:\\php\\OUTPUT\\* /w /f /i /s /e /h /y; Also, make sure the account Apache is running as has the permissions required to perform that copy. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php