Home  >  Article  >  Backend Development  >  搭建PHP运行环境

搭建PHP运行环境

WBOY
WBOYOriginal
2016-06-23 14:29:18977browse

1、解压php-5.0.0-Win32.zip到C:\PHP,重命名php.ini-dist为php.ini

2、修改Apache的httpd.conf文件,在最后添加:
ScriptAlias /php/ "C:/PHP/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"

3、修改php.ini文件,将extension_dir 改成extension_dir = "C:\PHP\ext";
去掉extension=php_mysql.dll前面";"

4、在系统变量PATH路径中添加C:\PHP

至此你就可以轻松地运行PHP了,如果要用mysql,则在php.ini文件中将extension=php_mysql.dll前的";"去掉即可。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:PHP json_encode() 函数介绍Next article:php写入数据库