note 79320 added to ref.win32service
| From: | meatsylvaintiretbessepointfr at osu1 dot php dot net | Date: | Tue, 20 Nov 2007 20:45:33 +0000 |
| Subject: | note 79320 added to ref.win32service | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-132442@lists.php.net to get a copy of this message | ||
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 !
----
Server IP: 194.153.94.10
Probable Submitter: 81.56.135.92
----
Manual Page -- http://www.php.net/manual/en/ref.win32service.php
Edit -- https://master.php.net/note/edit/79320
Del: integrated -- https://master.php.net/note/delete/79320/integrated
Del: useless -- https://master.php.net/note/delete/79320/useless
Del: bad code -- https://master.php.net/note/delete/79320/bad+code
Del: spam -- https://master.php.net/note/delete/79320/spam
Del: non-english -- https://master.php.net/note/delete/79320/non-english
Del: in docs -- https://master.php.net/note/delete/79320/in+docs
Del: other reasons-- https://master.php.net/note/delete/79320
Reject -- https://master.php.net/note/reject/79320
Search -- https://master.php.net/manage/user-notes.php