1.下載apache haus
下載網址:http://www.apachehaus.com/cgi-bin/download.plx
設定apache對php的支援。
php5 support
LoadModule php5_module D:/php/php5apache2_4.dll
AddType application/x-httpd-php .php .html .htm
configure the path to php.ini
PHPIniDir “D:/php”
Install as a service
httpd -k lll
httpd -k start
Other Command line options:
Stop Apache httpd -k stop
Restart Apache httpd -k restart
Uninstall Apache Service httpd -k uninstall
Test Config Syntax httpd -t
Version Details httpd -V
Command Line Options List httpd -h
2.php下載
http://windows.php.net/download/
解壓,修改php.ini-development為php.ini.
打開php.ini,修改如下內容:
1)extension_dir = “ext”改為extension_dir = “C:serversphp-5.6.13-Win32-VC11-x86ext”
2)修改date.timezone =Asia/Shanghai
3)這些檔案前面的「;」
extension=php_curl.dll
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdo_mysql.dll
extension=php_xmlrpc.dll
至此,win7下搭建php運作環境完成。後續會開始配置php連接mysql支援。
版權聲明:本文為部落客原創文章,未經部落客允許不得轉載。
以上就介紹了Win7下php運行環境搭建,包括了方面的內容,希望對PHP教程有興趣的朋友有幫助。