PHP code example of win32service / win32servicebundle

1. Go to this page and download the library: Download win32service/win32servicebundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

win32service / win32servicebundle example snippets


class MyRunner extends \Win32Service\Model\AbstractServiceRunner
{}


class MyRunner extends \Win32Service\Model\AbstractServiceRunner
{}

bash
php bin\console win32service:register
bash
php bin\console win32service:register --service-name=my_service
bash
php bin\console win32service:unregister
bash
php bin\console win32service:unregister --service-name=my_service
bash
php bin\console win32service:action start --service-name=my_service_1