electronish Posted January 5, 2007 Share Posted January 5, 2007 Hi .. i am trying to execute a .exe file but cannot .. whats the problem . if I put what is inside the $cmd in the command prompt then it works . So I have no problem with the command line . How do i modify it to work with PhP ? ? [code]$cmd = 'Desktop\vdub\vdub.exe /s"C:\Documents and Settings\John cena\Desktop\vdub\vDub3.vcf" /p"C:\Documents and Settings\Nishchay shah\Desktop\vdub\test.Avi","C:\Documents and Settings\John cena\Desktop\vdub\test3.avi" /r';system('$cmd');[/code] Link to comment https://forums.phpfreaks.com/topic/32951-problem-with-system-command/ Share on other sites More sharing options...
matto Posted January 5, 2007 Share Posted January 5, 2007 I know windows can play funny with the backslash - either use an escape char or use forward slash instead....eg: c:\\documentsor: c:/documents ;) Link to comment https://forums.phpfreaks.com/topic/32951-problem-with-system-command/#findComment-153433 Share on other sites More sharing options...
electronish Posted January 5, 2007 Author Share Posted January 5, 2007 [quote author=matto link=topic=121099.msg497365#msg497365 date=1167994710]I know windows can play funny with the backslash - either use an escape char or use forward slash instead....eg: c:\\documentsor: c:/documents ;)[/quote]DID that too .. sadly :( Link to comment https://forums.phpfreaks.com/topic/32951-problem-with-system-command/#findComment-153435 Share on other sites More sharing options...
matto Posted January 5, 2007 Share Posted January 5, 2007 are you using CLI or webserver? Link to comment https://forums.phpfreaks.com/topic/32951-problem-with-system-command/#findComment-153441 Share on other sites More sharing options...
electronish Posted January 5, 2007 Author Share Posted January 5, 2007 [quote author=matto link=topic=121099.msg497373#msg497373 date=1167995291]are you using CLI or webserver?[/quote]CLI ON Windows OS XP Link to comment https://forums.phpfreaks.com/topic/32951-problem-with-system-command/#findComment-153444 Share on other sites More sharing options...
matto Posted January 5, 2007 Share Posted January 5, 2007 you could test your command by creating it in a .bat file and if that works have the php script syste($bat_file) Link to comment https://forums.phpfreaks.com/topic/32951-problem-with-system-command/#findComment-153445 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.