Jump to content

running a windows command line from a web page


veedub

Recommended Posts

Hello!

 

  I have a web page on an intranet, i need to run a command in the local windows run from the webpage. for example when you press a button button on a webpage it has the same effect as running cmd from the run prompt on the local machine. Anyone know how to do this?

 

cheers.

Something like this should do the job.

 

$cmd = "del old_file.txt";
system($cmd);

 

The above example would remove a file named "old_file.txt". The above assumes the file is in the same directory as the PHP script. Of course the script would need the right permissions to remove the file....

 

;)

 

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.