Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP run command from the web server

Status
Not open for further replies.

timgerr

IS-IT--Management
Jan 22, 2004
364
US
I have a W32 box running phpdev5. I was wondering if I could have the W32 box that is running PHP run a dos batch file when a user hits a submit button?

Thanks
Timgerr
 
Yes. Look at PHP's Program Execution functions, in particular exec().

Just keep in mind two things:[ul][li]Since PHP runs using the permissions afforded to your web server, so will the batch file.[/li][li]You will have to invoke the command interpreter explicitly.[/li][/ul]


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top