PHP code example of clickalicious / webserverdaemon
1. Go to this page and download the library: Download clickalicious/webserverdaemon 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/ */
clickalicious / webserverdaemon example snippets
// Create an instance of PHP's internal webserver
$webserverDaemon = new \Clickalicious\Webserver\Daemon\Demonize(
$interface,
$port,
$documentRoot,
$uid,
$phpBinary,
$tempDir
);
// Daemon control
$webserverDaemon->start();
$webserverDaemon->restart();
$webserverDaemon->stop();
// Get PID
$webserverDaemon->start();
$webserverDaemon->getPid();
shell
$> php demo/start.php
shell
$> php demo/stop.php
shell
$> php demo/restart.php
shell
$> php demo/status.php
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.