首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 服务器 > Apache >

windows停php配置apache

2012-08-09 
windows下php配置apache注意: 记住当在 Windows 环境下的 Apache 配置文件中添加路径值时,所有的反斜线,如

windows下php配置apache
    注意: 记住当在 Windows 环境下的 Apache 配置文件中添加路径值时,所有的反斜线,如 c:\directory\file.ext,应转换为正斜线: c:/directory/file.ext。对目录来说,也必须由斜线结尾。

在httpd.conf最后一行追加如下:
       

 #    LoadModule php5_module "c:/php/php5apache2.dll"   AddHandler application/x-httpd-php .php    # configure the path to php.ini    PHPIniDir "C:/php"#The above configuration will enable PHP handling of any file that has a .php extension, #even if there are other file extensions. For example, a file named example.php.txt will be executed by the PHP handler. #To ensure that only files that end in .php are executed, use the following configuration instead: <FilesMatch \.php$>      SetHandler application/x-httpd-php </FilesMatch>



<IfModule dir_module> DirectoryIndex index.html index.php</IfModule>

在php.ini最后加入:
# php timezone configuredate.timezone = "Asia/Shanghai"date.default_latitude = 31.5167date.default_longitude = 121.4500 



以上来自官方文档: http://cn2.php.net/manual/zh/install.windows.apache2.php

热点排行