-
5th-September-2005, 07:09
#1
PHP and Windows Services
Any one know how to restart a windows service using PHP ?
This is what ive done so far ....
--
start.bat
--
@echo off
echo <<NAME OF SERVICE>> is starting ...
echo Starte <<NAME OF SERVICE>> ...
<<SERVICE EXE FILE>> /start
-----
--
stop.bat
--
@echo off
echo <<NAME OF SERVICE>> is stopping ...
echo Stoppe <<NAME OF SERVICE>> ...
<<SERVICE EXE FILE>> /stop
------
My php file
--
service_control.php
--
function start() {
exec("start.bat");
}
function stop() {
exec("stop.bat");
}
----
Any idea why this dnt work ?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules