Jump to content

try to execute batch file


homer.favenir

Recommended Posts

hi to all,

i have batch file:

 

@echo off
echo Hello this is a test batch file
pause

 

and its running well

 

what i want is to run this thru php, because i dont want user directly running it.

<?php
set_time_limit(0);
echo exec('C:\\commonfolder\\test.bat');
echo "Done!";
?>

 

it returned:

Press any key to continue . . .Done!

 

and there is no cmd window or no dos window.

 

how can i make the cmd window open when php runs.

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/164033-try-to-execute-batch-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.