BrainPill Posted June 16, 2019 Share Posted June 16, 2019 (edited) Not sure in which sub forum this should be, but its about running a php script from a batch file. I addes PHP to the environment variables and tested it with: php -? I made a batch file like this: rem @echo off START /B php -f "X:\wamp\www\test-batch\hello-world.php" I made a new dir called: C:\batch here is the script hello-world.php located when I make the task in task scheduler it pop ups a command line shell saying \Windows\System32. Nothing is executed. BUT .... when I type cd\ in this command line it , the php script gives output on the screen. How can I make the php file execute instantly without going to the wrong directory ? Edited June 16, 2019 by BrainPill Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now