定制 clickalicious/webserverdaemon 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

clickalicious/webserverdaemon

Composer 安装命令:

composer require clickalicious/webserverdaemon

包简介

Small utility to demonize PHP's internal webserver.

README 文档

README

Logo of webserver-daemon

Small utility to demonize PHP's internal webserver.

Build Status Codacy branch grade Codacy coverage clickalicious open source
GitHub release license Issue Stats Dependency Status

Table of Contents

Features

  • Demonize PHP's internal webserver by sending process to background
  • Without nohup dependency
  • Control webserver with well known start, stop, restart & status command
  • Simple PID- and Logfile abstraction
  • Multi process support
  • High-quality & stable codebase (following PSR standards e.g. PSR-1,2,4)
  • Built on top of good PHP libraries
  • Clean + well documented code
  • Unit-tested with a good coverage

Example

We provided some examples in the directory "demo" on How-To use the library and wrapper around PHP's internal webserver:

PHP

An example on how to use the library in PHP context:

<?php
 
// 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();

Start

The following simple example shows how the daemon can be started: Demo START daemon »

Use this command for execution of the demo:

$> php demo/start.php

Stop

The following simple example shows how the daemon can be stopped: Demo STOP daemon »

Use this command for execution of the demo:

$> php demo/stop.php

Restart

The following simple example shows how the daemon can be restarted: Demo RESTART daemon »

Use this command for execution of the demo:

$> php demo/restart.php

Status

The following simple example shows how the status of the daemon can be queried: Demo STATUS daemon »

Use this command for execution of the demo:

$> php demo/status.php

Requirements

  • PHP >= 5.6 (compatible up to version 7.2 as well as HHVM)

Philosophy

This library provides the functionality to daemonize PHP's internal webserver and send the process to background without blocking the console or process starting the internal webserver.

Versioning

For a consistent versioning i decided to make use of Semantic Versioning 2.0.0 http://semver.org. Its easy to understand, very common and known from many other software projects.

Roadmap

  • Target stable release 1.0.0
  • >= 90% test coverage

Throughput Graph

Security Issues

If you encounter a (potential) security issue don't hesitate to get in contact with us opensource@clickalicious.de before releasing it to the public. So i get a chance to prepare and release an update before the issue is getting shared. Thank you!

Participate & Share

... yeah. If you're a code monkey too - maybe we can build a force ;) If you would like to participate in either Code, Comments, Documentation, Wiki, Bug-Reports, Unit-Tests, Bug-Fixes, Feedback and/or Critic then please let me know as well!

Sponsors

Thanks to our sponsors and supporters:

JetBrains Navicat
Copyright
Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固