搭建PHP開發環境

來源:互聯網
上載者:User
第一步,裝apache

下載apache 的httpd-2.0.64-win32-x86-openssl-0.9.8o.msi到本地。 本來打算下新版2.2的,但是看頁面上顯示的是2.0的模組在2.2下可能會失效,所以就下得2.0的版本

然後設定檔httpd.conf

配置 DocumentRoot的為 我們網站的根目錄。 DocumentRoot "E:/apache_Dir/docRoot"

配置 DirectoryIndex 就是apache先載入的網頁檔案。 DirectoryIndex homepage.php index.html index.html.var

第二步 安裝PHP

從網站下得時php-5.2.17-Win32-VC6-x86.zip這個版本

然後還是修改apache的 httpd.conf設定檔

將php以模組的形式註冊近apache 在173行附近

LoadModule php5_module E:/apache_Dir/php/php5apache2.dll
PHPIniDir "E:/apache_Dir/php"

首先在764行附近添加如下的類型映射

AddType application/x-httpd-php .php
AddType application/x-httpd-php .html

完成,我的php檔案放置在E:/apache_Dir/docRoot目錄下,以homepage.php命名

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.