running batch file through php
i am having a code to run a batch file, the batch file is running well but my browser get hanged and does not run the next line of code after EXEC function:
exec () runs properly but it does not go to next step to echo.
please suggest any solution
thanks in advance
the batch will be run on the server.
not on the clients machine if you need to run the batch on the clients machine then you will need to have the client down load it and manually run it.
"water go down the hole" - plucky duck
You might try proc_open or popen
I am trying to execute .bat file using IIS 7, PHP 5.3 on 2008. I use this code in my vbs.php, exec(cmd /c password.bat); When I run the page it freezes, but if I take comment it out it loads just fine. Does anyone know why ?
Whats in the batch file? If the batch file has any prompts or anything that requires human intervention... then it wont return control back to PHP and will freeze.
You may also want to look at using either of these as i'm not entirely sure on what your aim is but i'm sure you can decide if they better suit your requirements:
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)