Heim  >  Artikel  >  Backend-Entwicklung  >  PHP快速入门 -- Apache、PHP、MySQL安装及配置

PHP快速入门 -- Apache、PHP、MySQL安装及配置

WBOY
WBOYOriginal
2016-08-08 09:32:30814Durchsuche

win7 64位

Apache-2.4  64位 VC11

PHP-5.5 64位 VC11

MySQL-5.6 64位

 一、下载

1、Apache下载地址:http://www.apachelounge.com/download/VC11/binaries/httpd-2.4.10-win64-VC11.zip

2、PHP下载地址:http://windows.php.net/downloads/releases/php-5.5.20-Win32-VC11-x64.zip

3、MySQL下载地址:http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.22-winx64.zip

4、VC11下载地址:http://www.microsoft.com/en-US/download/details.aspx?id=30679

二、配置

Apache配置

1、修改ServerRoot “D:/apache24”,Apache安装的目录

2、修改ServerAdmin,可选

3、去掉ServerName前面的#

4、修改DocumentRoot “D:/www”以及,网站根目录

5、修改DirectoryIndex index.html index.php index.htm 支持更多的默认页

6、修改ScriptAlias /cgi-bin/"D:/apache24/cgi-bin/"以及

之后开始 -- 运行,输入cmd,进入apache24/bin目录,运行httpd,如果配置没有问题则没有任何输出,否则会输出错误提示

增加到windows的系统服务,可以自启动:httpd.exe -k install -n "apache24"

卸载这个服务:httpd.exe -k uninstall -n "apache24"

PHP配置

1、将php.ini-development复制粘贴重命名为php.ini

2、在apache24/conf/httpd.conf 的最后加上

LoadModule php5_module "D:/php/php5apache2_4.dll"

AddHandler application/x-httpd-php .php

PHPIniDir "D:/php"

3、开启extension_dir="D:/php/ext"

4、开启extension=php_mysql.dll 和 extension=php_mysqli.dll

MySQL配置

直接运行安装即可

以上就介绍了PHP快速入门 -- Apache、PHP、MySQL安装及配置,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn