leon723 / chestnut
Chestnut PHP Framework
0.9.18
2016-07-07 08:50 UTC
Requires
- php: >=5.6.0
- filp/whoops: ^2.0
- firebase/php-jwt: ^3.0
- symfony/http-foundation: 2.7.*
This package is not auto-updated.
Last update: 2026-06-07 02:28:39 UTC
README
Chestnut PHP framework
安装
通过 composer 安装
composer required "leon723/chestnut:^0.9.0"
在项目根目录创建 index.php 并输入以下内容:
<?php
require_once "../vendor/autoload.php";
$app = new Chestnut\Foundation\Application(
realpath("../")
);
Route::group(['namespace' => 'App\Controllers'], function () {
require '../app/route.php';
});
$app->run();
美化链接
Apache
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
Nginx
location / {
try_files $uri $uri/ /index.php?$query_string;
}