準備工作
下載php:http://www.php.net/downloads.php 下載php相關:vc_redist.x64 (不下載這個的話,啟動會報找不到dll),十幾M不大
修改php配置
找到php.ini-development檔案,修改為php.ini,儲存後開啟: 找到extension_dir去掉注釋,並把後邊的路徑改為ext檔案的實際路徑,如c:/php7/ext 找到extension=php_mysqli.dll去掉注釋
啟動php
php-cgi.ext -b 127.0.0.1:9000
配置nginx
location / {root C:\Web\bbs;index index.html index.htm index.php;}#訪問前台 location ~ \.php$ { #rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last; #rewrite ^/forum-([0-9]+)-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2 last; #rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /viewthread.php?tid=$1&extra=page%3D$3&page=$2 last; #rewrite ^/space-(username|uid)-(.+)\.html$ /space.php?$1=$2 last; #rewrite ^/tag-(.+)\.html$ /tag.php?name=$1 last; root C:\Web\bbs; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME C:\Web\bbs$fastcgi_script_name; include fastcgi_params;}
php終端的解決方式:http://www.zuimoban.com/php/php/11504.html