ajeesh.tr Posted July 22, 2011 Share Posted July 22, 2011 Hi everyone, Am having a batch file that is called from a php file,that pops up a new command prompt,it works when executed from the command prompt,when i execute the same file in browser,it doesn't pop up command window.Am using Windows 7 operating system. Link to comment https://forums.phpfreaks.com/topic/242619-execute-batch-file-in-the-browser/ Share on other sites More sharing options...
IrOnMaSk Posted July 22, 2011 Share Posted July 22, 2011 try this http://php.net/manual/en/function.shell-exec.php or this http://www.php.net/manual/en/function.exec.php why you need to call it from php? use autosys or task scheduler or something if you can't figure that out... Link to comment https://forums.phpfreaks.com/topic/242619-execute-batch-file-in-the-browser/#findComment-1246209 Share on other sites More sharing options...
teynon Posted July 22, 2011 Share Posted July 22, 2011 I believe PHP is considered it's own user on the system. So it launches it's own hidden / background cmd prompt when using shell. I would Google it for more info. You can see an example of this with: <?php echo shell_exec("ping google.com"); ?> The program does actually work, but it doesn't show up on your computer. Link to comment https://forums.phpfreaks.com/topic/242619-execute-batch-file-in-the-browser/#findComment-1246214 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.