注意兩點:
一、網站目錄中如果包含\t或者\n之類的,必須進行轉義。例如:F:\www\tp51\public需改爲F:\www\\tp51\public;
二、必須添加nginx的重寫規則,官網已給出,這裏再註明一次:
location / { // …..省略部分代碼
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
}
}
注意兩點:
一、網站目錄中如果包含\t或者\n之類的,必須進行轉義。例如:F:\www\tp51\public需改爲F:\www\\tp51\public;
二、必須添加nginx的重寫規則,官網已給出,這裏再註明一次:
location / { // …..省略部分代碼
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
}
}
一、相關配置1、配置文件:config/config.php<?phpreturn [// 是否開啓路由 'url_route_on'
//模型(在模塊下建立model目錄,然後建模型文件如Test.php,文件名同表名test)//Test:: 同價於 Db::table('test