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

搭建PHP运行环境

WBOY
Release: 2016-06-23 14:29:18
Original
1018 people have browsed it

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前的";"去掉即可。

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template