koriym / php-server
1.0.0
2023-07-26 03:11 UTC
Requires
- php: ^8.0
- symfony/process: ^5.4
Requires (Dev)
- ext-curl: *
- bamarni/composer-bin-plugin: ^1.8
- phpunit/phpunit: ^9.5
- psalm/plugin-phpunit: ^0.18.4
README
简单的PHP内置服务器实用程序,用于测试
您是否需要使用HTTP服务器进行测试?此实用程序会在您需要时快速启动内置PHP服务器。
安装
composer require koriym/php-server
用法
$server = new PhpServer('127.0.0.1:8080', 'path/to/index.php'); $server->start(); // your http test here $server->stop();
您还可以指定公共Web目录。
$server = new PhpServer('127.0.0.1:8080', 'path/to/public');