Maison >développement back-end >tutoriel php >Win7下php运行环境搭建
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 install
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:\servers\php-5.6.13-Win32-VC11-x86\ext”
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教程有兴趣的朋友有所帮助。