Is it possible to run an EXE file on the server using a link (in PHP) if the file is currently not running. Or even if it is running, is it possible to use PHP to run a file located for example in C:/debug/run_this.exe on the server using a PHP page on the web server?
Thanks in advance.
Run EXE on server using PHP
Moderator: General Moderators
Im trying:
And am having no luck.
Code: Select all
<?php
system ("C:\\local\\debug\\server.exe");
?>- dibyendrah
- Forum Contributor
- Posts: 491
- Joined: Wed Oct 19, 2005 5:14 am
- Location: Nepal
- Contact:
use exec(string path_to_function) function to use the system call or use system(string path_to_binary). This will only be possible if you are not using PHP in safe mode.
There are serveral other functions like passthru() as well.
try visiting this url for more info : http://www.php.net/manual/en/function.system.php
cheers,
dibyendra
There are serveral other functions like passthru() as well.
try visiting this url for more info : http://www.php.net/manual/en/function.system.php
cheers,
dibyendra