|
Answer» hi all,
I've got a php script that I want to start via a batch file and WAIT for it to close before continuing.
I've installed WAMP which allows me to run php script form the command line. ( i had to add the path of the installation folder to my environment path settings )
I have confirmed that my php script works by opening a command PROMPT and running "php C:\path\to\php\script"
Sadly, I'm having trouble starting this script from a batch file. I've tried...
Code: [Select]start /wait "cmd.exe", "php C:\scripts\php\databse.php"
and EVERY variation of the above, all to no joy.
Any one got any ideas?? Why the start with the /wait SWITCH? Does the script REALLY need to run in another window? Can you not simply run php C:\scripts\php\databse.php within your batch file?
I'm guessing php is in your system path based on the lack of a path in the original post. If a program needs the cmd shell to run, it will be opened automatically by the OS.
Good luck. nice.
your right, i didn't need to run it in it's own window.
Cheers mate
|