- wnmp 下载 wnmp-4.0.0)
- php-7.0.15 下载,替换掉 wnmp 默认目录(不替换会有问题)
配置 nginx (关注:server_name 域名或地址,root 项目地址 index.php 路径) ```php
Begin HTTP Server
server { listen 80; server_name 127.0.0.1; index index.html index.htm index.php; root “D:\dev\lumenx\src\public”; access_log logs/lumenx.log; error_log logs/lumenx_error.log; client_max_body_size 50M;
location / {
if (-f $request_filename){expires 7200;break;}if (!-f $request_filename){rewrite ^ /index.php last;break;}
}
location ~.*.php$ {
if (!-f $request_filename){rewrite ^ /index.php last;break;}include fastcgi.conf;fastcgi_param HTTPS off;fastcgi_pass 127.0.0.1:9001;fastcgi_index index.php;
} }
- 在 wnmp 启动 php(相当于 php-fpm) 与 nginx遇到问题排查方法:1. php 版本不对排查,在 index.php 最上层写入如下代码。然后在浏览器中测试代码```phpprintf(phpinfo());return ""
- 遇到问题可能是对于的扩展没有打开,
php -m查看扩展bcmathbz2calendarcmlbCorectypecurldatedomexiffileinfofilterftpgdgearmangettexthashiconvigbinaryjsonlibxmlmbstringmcryptmysqlimysqlndoci8opensslpcntlpcrePDOpdo_mysqlpdo_sqlitePharposixprotobufreadlineredisReflectionsessionshmopSimpleXMLsoapsocketsSPLsqlite3standardswoolesysvmsgsysvsemsysvshmtokenizerulswddxxhprofxmlxmlreaderxmlwriterxslyarzipzlib
