带缓存的路由库Ham.zip

时间:2022-08-05 01:30:28
【文件属性】:
文件名称:带缓存的路由库Ham.zip
文件大小:15KB
文件格式:ZIP
更新时间:2022-08-05 01:30:28
开源项目 Ham 是一款轻量级的路由框架,利用缓存来提升速度。把任何 I/O 相关的东西缓存进 XCache/APC。要求 PHP 5.3 和 XCache 或者 APC。 示例代码: require '../ham/ham.php'; $app = new Ham('example'); $app->config_from_file('settings.php'); $app->route('/pork', function($app) {     return "Delicious pork."; }); $hello = function($app, $name='world') {     return $app->render('hello.html', array(         'name' => $name     )); }; $app->route('/hello/', $hello); $app->route('/', $hello); $app->run(); 标签:Web框架
【文件预览】:
Ham-master
----composer.json(717B)
----.travis.yml(62B)
----tests()
--------bootstrap.php(87B)
--------phpunit.xml(652B)
--------HamTest.php(4KB)
----LICENSE(1KB)
----examples()
--------twig_example()
--------basic_example()
----.gitignore(49B)
----ham()
--------ham.php(13KB)
----README.md(4KB)

网友评论