jabernardo/calf
Composer 安装命令:
composer require jabernardo/calf
包简介
A slim router for PHP Web Applications
README 文档
README
Yet another Micro-framework for PHP.
Installation
composer require jabernardo/calf
Hello World
<?php require("vendor/autoload.php"); $app = new \Calf\App(); $home = new \Calf\HTTP\Route('/', function($req, $res) { return $res->write('Hello World!'); }); $app->add($home); $app->run();
Configuring Web Server
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ index.php [QSA,L]
Running...
php -S localhost:8888 index.php
Testing
phpunit
Learn more
Please see the project's wiki page here.
License
The calf is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 42
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-01-28