测试环境:
system:centos 7 CPU:4核 内存:8 GB
nginx:1.15.0
php:7.1.18
gene:V5.1.2
ab -n10000 -c100 127.0.0.1/test.php
<?php
echo 'test';
ab -n10000 -c100 127.0.0.1/test
框架入口:
<?php
define('APP_ROOT', __dir__ . '/app/');
$app = \Gene\Application::getInstance();
$app
->load("router.ini.php")
->load("config.ini.php")
->run();
路由定义:
<?php
$router = new \Gene\Router();
$router->clear()
->get("/test","\Controllers\Index@test");
控制器定义:
<?php
namespace Controllers;
class Index extends \Gene\Controller
{
function test()
{
echo 'test';
}
}