htdoc
此文件夹时apapche的个目录,当访问该服务器时,会找到该目录的index.html文件error
错误日志文件夹conf
关于apache的配置的文件夹bin,cgi-bin
windows下可执行文件#ServerName localhost:80
是服务器的名称DocumentRoot "E:/server/apache/htdocs"
是服务器的根目录Listen 80
是服务器的端口DirectoryIndex index.php index.html
是服务器默认选择的文件,本来默认是index.html,然而index.php是之后配置<IfModule log_config_module>
之前进行配置案例:
#加载php
LoadModule php5_module ‘E:/server/php5/php5apache2_2.dll‘
php.ini所在路径
案例:
#加载php配置文件
PHPIniDir ‘E:/server/php5‘
案例:
#分配给php
AddType application/x-httpd-php .php
;extension=php_mysql.dll
(这个是原版的mysql)去掉;
,如果想用PDO连接数据库的话,找到extension=php_pdo_mysql.dll
去掉;
案例:
; extension_dir = "ext"
;增加拓展路径 extension_dir = etc拓展所在位置的路径
extension_dir = "E:/server/php5/ext"
案例:
;date.timezone =
;增加时区
date.timezone = PRC
原文:https://www.cnblogs.com/00544--/p/15186462.html