首頁  >  文章  >  後端開發  >  解析PHP5.6.30與Apache2.4.x配置

解析PHP5.6.30與Apache2.4.x配置

怪我咯
怪我咯原創
2017-06-16 11:07:311903瀏覽

這篇文章主要介紹了詳解PHP5.6.30與Apache2.4.x配置,小編覺得蠻不錯的,現在分享給大家,也給大家做個參考。一起跟著小編過來看看吧

解析PHP5.6.30與Apache2.4.x配置
請確保你的電腦安裝有了

解析PHP5.6.30與Apache2.4.x配置 

若沒有安裝請點選vc_redist_x64/86.exe檔

解析PHP5.6.30與Apache2.4.x配置
#下載了將其解壓縮到自己想要資料夾中
解析PHP5.6.30與Apache2.4.x配置 

#開啟conf/httpd.conf檔案

解析PHP5.6.30與Apache2.4.x配置 

#這是連接埠可依自己需求進行修改

這是Apache服務存取PHP檔案的目錄

解析PHP5.6.30與Apache2.4.x配置 

#還有cgi-bin的位置

解析PHP5.6.30與Apache2.4.x配置 


解析PHP5.6.30與Apache2.4.x配置


解析PHP5.6.30與Apache2.4.x配置##。

#支援多個預設頁面

 

#將Apache服務安裝到Windows服務中以管理員身分執行cmd


解析PHP5.6.30與Apache2.4.x配置

httpd -k install -n "apache24"

如需卸載服務

httpd -k uninstall -n "apache24"
解析PHP5.6.30與Apache2.4.x配置

接著啟動Apache服務


 

解析PHP5.6.30與Apache2.4.x配置瀏覽器輸入localhost 回車


#接下來是設定PHP環境解析PHP5.6.30與Apache2.4.x配置

從官網下載PHP http://windows.php.net/download#php-5.6

 

#下載後將其解壓縮到自己想要的目錄複製份php.ini-development,改名為PHP.ini 解析PHP5.6.30與Apache2.4.x配置

 

開啟Apache24\conf下httpd.conf 加入以下內容


# php5 support
LoadModule php5_module "F:/devloper/php-5.6.30/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "F:/devloper/php-5.6.30"

解析PHP5.6.30與Apache2.4.x配置

#####測試下在Apache/htdocs目錄下新建一檔案index.php 內容如下#########
<?php phpinfo(); ?>
#########開啟瀏覽器存取localhost/index.php ###############

以上是解析PHP5.6.30與Apache2.4.x配置的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn