說明
由於機器本身是Windows x64系統,所以選擇了所有x64的軟體;如果想選擇x86也可以相容;如果機器是x86的,那麼只能選擇x86的軟體
下載位址
下載位址- 這個目錄可以更改選擇軟體安裝目錄為c:zjcc - 這個目錄可以更改. zjcservernginx
以c:zjcwww
作為網站根目錄) iddenConsole
把RunHiddenConsole.exe 解壓到c:zjcserverutils
目錄<code> #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} </code>
<code> location ~ \.php$ { # root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME c:/zjc/www$fastcgi_script_name; include fastcgi_params; } </code>
內容為
<code>cd server<span>\php</span> ..<span>\utils</span><span>\RunHiddenConsole</span>.exe php-cgi.exe -b 127.0.0.1:9000 -c c:/zjc/server/php/php.ini cd ..<span>\.</span>. cd server<span>\nginx</span> ..<span>\utils</span><span>\RunHiddenConsole</span>.exe nginx.exe cd ..<span>\.</span>.</code>
c:zjcsvr_stop.bat
內容為
<code><span>taskkill</span> /F /IM nginx.exe > <span>nul</span><span>taskkill</span> /F /IM php-cgi.exe > <span>nul</span></code>
安裝配置mysql
運行dotNetFx40_Full_x86_x64.exe
.選擇
Server Only
、php 、mysql
新網頁c:zjcwwwcheck_mysql.php
訪問網頁內容為
重啟伺服器<code><span><?php</span><span>echo</span> phpinfo(); <span>?></span></code>登入後複製<code><span><?php</span><span>$con</span> = mysqli_connect(<span>"localhost"</span>, <span>"root"</span>, <span>"a123456"</span>); <span>if</span>(!<span>$con</span>) { <span>die</span>(<span>'Could not connect: '</span> . mysqli_error()); } <span>else</span> { <span>echo</span><span>"Database connected successfully"</span>; } mysqli_close(<span>$con</span>);</code>登入後複製
http://127.0.0.1/check_mysql.php
可以看到連接成功的消息就對了