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.*
- dev-master
- 0.9.18
- 0.9.17
- 0.9.16
- 0.9.15
- 0.9.14
- 0.9.13
- 0.9.12
- 0.9.11
- 0.9.10
- 0.9.9
- 0.9.8
- 0.9.7
- 0.9.6
- 0.9.5
- 0.9.4
- 0.9.3
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.12
- 0.8.11
- 0.8.10
- 0.8.9
- 0.8.8
- 0.8.7
- 0.8.6
- 0.8.5
- 0.8.4
- 0.8.3
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.20
- 0.7.19
- 0.7.18
- 0.7.17
- 0.7.16
- 0.7.15
- 0.7.14
- 0.7.13
- 0.7.12
- 0.7.11
- 0.7.10
- 0.7.9
- 0.7.8
- 0.7.7
- 0.7.6
- 0.7.5
- 0.7.4
- 0.7.3
- 0.7.2
- 0.7.1
- 0.7.0
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.1
- 0.5.0
- 0.4.0
- 0.3.0
This package is not auto-updated.
Last update: 2024-04-13 14:29:21 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;
}