配置php

来源:互联网 发布:404什么意思网络用语 编辑:程序博客网 时间:2024/05/31 15:19
配置php的基本运行环境
php配置文件:
    在php的语言包/php.ini
    php的初始语言包,提供了2个推荐配置文件:
    开发阶段只要将php.ini-development文件改为php.ini文件即可
    确定php文件位置:
    查看php.ini的配置路径
        使用一个简单的php网页,其中只有一行代码:
            <?php
                phpinfo();
            ?>
        运行后:
        在网页中可找到配置文件路径
    可以在apache配置文件中来指定php.ini的位置,apache文件中的httpd.conf文件中添加:
        PHPIniDir "D:\work\php"
    在重启apache,查看提示信息    
    
    
一、配置时区
    根据关键字timezone找到配置行
    初始:
        [Date]
        ; Defines the default timezone used by the date functions
        ; http://php.net/date.timezone
        ;date.timezone =
    修改为:
        [Date]
        ; Defines the default timezone used by the date functions
        ; http://php.net/date.timezone
        date.timezone = PRC
0 0