thinkcmf安装常见问题
thinkcmf安装的时候经常遇见的问题,以下说明以宝塔为例。
访问页面后是403
宝塔后台->网站->对应域名后面的设置按钮->网站目录->运行目录,选择public。
fileinfo不支持
宝塔后台->软件商城->已安装->对应版本的php后面的设置按钮->安装扩展,找到fileinfo点击安装。
测服务器rewrite、API rewrite不支持
宝塔后台->网站->对应域名后面的设置按钮->伪静态,输入以下代码
location / { index index.php index.html index.htm; if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?s=$1; } } location /api/ { index index.php index.html index.htm; if (!-e $request_filename) { rewrite ^/api/(.*)$ /api.php?s=$1; } } location ~* ^\/upload\/.+\.(html|php)$ { return 404; } location ~* ^\/plugins\/.+\.(html|php)$ { return 404; } location ~* ^\/themes\/.+\.(html|php)$ { return 404; }
目录、文件权限检查无法写入
在宝塔文件管理里面找到对应的文件位置,点击后面的权限,权限设置成755