Home > php教程 > php手册 > 配置Apache2 + PHP5 + MYSQL5

配置Apache2 + PHP5 + MYSQL5

WBOY
Release: 2016-06-13 09:49:51
Original
840 people have browsed it

  配置过程:
  
  (一)http.conf
  把PHP直接作为apache的一个模块运行:
  LoadModule php5_module "C:/php/php5apache2.dll"
  AddType application/x-httpd-php .php
  
  在Apache目录下建立了一个www的目录用于存放站点文件,在http.conf里:
  把DocumentRoot "D:/Apache2/htdocs"改成了DocumentRoot "D:/Apache2/www"
  直接列目录:
  Options FollowSymLinks
  AllowOverride None
  改为:  
  Options Indexes FollowSymLinks
  AllowOverride None
  设置默认字符为中文简体:
  AddDefaultCharset GB2312
  重新启动apache
  
  (二)php.ini  
  把php.ini-dist复制到C:windows 下改名为 php.ini
  extension_dir = "C:phpext"   
去掉以下分号,以支持mysql:
  ;extension=php_mysql.dll
  把php目录下的 libmysql.dll 和 libmysqli.dll 复制到windows/system32下。
  重新启动apache
  
  (三)Mysql  
  安装Mysql:  
  然后浏览“http://localhost/phpmyadmin”

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template