承接 hub20xx/php-local-server 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

hub20xx/php-local-server

Composer 安装命令:

composer require --dev hub20xx/php-local-server

包简介

A class to manage PHP's built-in server

README 文档

README

Build Status

You're on linux and you want a simple way to start and stop a local server.

Install

Via Composer

$ composer require hub20xxx/php-local-server

Usage

require __DIR__ . '/vendor/autoload.php';

$docroot = __DIR__ . '/www';

// by default the server is running on 127.0.0.1:1111
$server = new PhpLocalServer\Server($docroot);

// you can specify the address and port
// in the constructor
$address = '127.0.0.2';
$port = '1234';
$server = new Server($docroot, $address, $port);

// or using the setters
$server = new Server($docroot);
$server->setAddress($address);
$server->setPort($port);

// setting environment variables
$server->setEnvironmentVariable('ENV', 'testing');
$server->setEnvironmentVariable('FOO', 'bar');

// starting the server
$server->start();

// using the server

// stopping the server
$server->stop();

// $server->stop() is called in the destructor in case you omit to stop the server

Testing

$ phpunit

License

MIT

Credits / Thanks

This package was inpired by this blog post

Many thanks :)

Contributing

If you'd like to contribute, please use Github (issues, pull requests etc).

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固