用AI赚第一桶💰低成本搭建一套AI赚钱工具,源码可二开。 广告
> 安装时不要开 xdebug 扩展 > public/index.php是项目的入口文件,请配置服务器时把 public 目录做为 web 目录 ## 环境要求 > PHP >= 5.5.0 >PDO >MBstring >CURL ## 推荐服务器配置 >PHP >=5.6 >MySQL >=5.6 >CentOS >=6.5 >Nginx ## nginx配置参考 ``` server{ listen 80; server_name demo5.thinkcmf.com; root 你的 ThinkCMF5目录/public; # 该项要修改为你准备存放相关网页的路径 location / { index index.php index.html index.htm; #如果请求既不是一个文件,也不是一个目录,则执行一下重写规则 if (!-e $request_filename) { #地址作为将参数rewrite到index.php上。 rewrite ^/(.*)$ /index.php?s=$1; #若是子目录则使用下面这句,将subdir改成目录名称即可。 #rewrite ^/subdir/(.*)$ /subdir/index.php?s=$1; } } location /api/ { index index.php index.html index.htm; #如果请求既不是一个文件,也不是一个目录,则执行一下重写规则 if (!-e $request_filename) { #地址作为将参数rewrite到index.php上。 #rewrite ^/(.*)$ /index.php?s=$1; #若是子目录则使用下面这句,将subdir改成目录名称即可。 rewrite ^/api/(.*)$ /api/index.php?s=$1; } } location ~* ^\/upload\/.+\.(html|php)$ { return 404; } location ~* ^\/plugins\/.+\.(html|php)$ { return 404; } location ~* ^\/themes\/.+\.(html|php)$ { return 404; } #proxy the php scripts to php-fpm location ~ \.php { include fastcgi_params; ##pathinfo支持start #定义变量 $path_info ,用于存放pathinfo信息 set $path_info ""; #定义变量 $real_script_name,用于存放真实地址 set $real_script_name $fastcgi_script_name; #如果地址与引号内的正则表达式匹配 if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") { #将文件地址赋值给变量 $real_script_name set $real_script_name $1; #将文件地址后的参数赋值给变量 $path_info set $path_info $2; } #配置fastcgi的一些参数 fastcgi_param SCRIPT_FILENAME $document_root$real_script_name; fastcgi_param SCRIPT_NAME $real_script_name; fastcgi_param PATH_INFO $path_info; ###pathinfo支持end fastcgi_intercept_errors on; fastcgi_pass 127.0.0.1:9000; # fastcgi_pass 如果是 sock形式,可能是下面的配置 # fastcgi_pass unix:/tmp/php-cgi.sock } } ``` ## nginx https配置参考 https://www.kancloud.cn/thinkcmf/cmf5api/379931 ## 虚拟空间配置参考 https://www.thinkcmf.com/topic/1449.html ## 阿里云 Centos 7 PHP7环境配置 LNMP https://www.thinkcmf.com/topic/351.html ## 视频讲解 ThinkCMF本地运行环境之phpstudy配置 https://chuanke.baidu.com/v4472461-233078-1808151.html