PHP
downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

win32_create_service> <Enregistre un script PHP pour exécuter en tant que service
Last updated: Fri, 26 Dec 2008

view this page in

Fonctions win32service

Sommaire



add a note add a note User Contributed Notes
Fonctions win32service
me at sylvain tiret besse point fr
20-Nov-2007 12:45
Just to help a little, the service control command must be in the first script called. If you try to type this portion of code in a separate file and include it, the SCM will not get the controls.
example :

- file1.inc :
<?PHP
class MyClass{
 
 function
__construct() {

   
$x = win32_start_service_ctrl_dispatcher('service');

   
    while (
WIN32_SERVICE_CONTROL_STOP!=win32_get_last_control_message()){
       
//your code
 
}
}
?>

- service.php :
<?PHP
include("file1.inc");
$object = new MyClass();

?>

WON'T WORK !

 
show source | credits | stats | sitemap | contact | advertising | mirror sites