BirdieUK Posted November 24, 2010 Share Posted November 24, 2010 Hi, I have a windows xp home edition computer running xampp and for some reason, the following programs will not work when called upon. $command = "iexplore.exe www.google.com"; system($command); $command2 = "C:\\xampp\\htdocs\\spotifyControl\\playpause.ahk"; system($command2); Both commands, when in command prompt, work perfectly... any ideas?? Thanks. Link to comment https://forums.phpfreaks.com/topic/219720-php-system-not-responding-correctly/ Share on other sites More sharing options...
jim_keller Posted November 24, 2010 Share Posted November 24, 2010 I've run into trouble with exec() on Windows before due to not having my quotes set up correctly. for some reason when using exec() on windows with a path that has spaces in it, not only do you need to enclose the path itself in double quotes, but the entire exec'd command needs to be enclosed in double quotes as well. Try your call as: $command = "\"iexplore.exe www.google.com\""; or $command = "\"iexplore.exe\" \"www.google.com\""; Link to comment https://forums.phpfreaks.com/topic/219720-php-system-not-responding-correctly/#findComment-1139051 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.