apache2.2.22+php5.47+mysql5.5.27服务器迁移问题汇总

1、

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in

Cause: 
  
这是因为PHP所取的时间是格林威治标准时间,所以和你当地的时间会有出入格林威治标准时间和北京时间大概差8个小时左右,我们可以按照下面的方法解决。

解决办法:

1、在页头使用date_default_timezone_set()设置我的默认时区为北京时间,即

<?php

date_default_timezone_set("PRC");

?>就可以了。

2、  php.ini中设置date.timezone的值为PRC,设置好以后的为:date.timezone=PRC,同时取消这一行代码的注释,即去掉前面的分号就可以了。

我用的是第2种方法,因为程序比较多。


2、
Warning: include(duibifun.php) [function.include]: failed to open stream: No such file or directory in D:\xampp\htdocs\PHP100\web\index.php on line 182

Warning: include() [function.include]: Failed opening 'duibifun.php' for inclusion (include_path='.;C:\php\pear') in D:\xampp\htdocs\PHP100\web\index.php on line 182

此问题是在调用dibifun.php文件时,无法找到该文件。也就是php.ini文件没有配置好。配置方法就是在错误提示中第二个所提示的,

处理方法:修改php.ini文件中的include_path为你的include文件所有的路径。如我的是

把;include_path= ".;D:\xampp\php\PEAR"

改为下面这句:include_path = "D:/xampp/php/includes"

然后把php下的indludes文件夹copy到上面的路径中就可以了。

在虚拟机里安装的是C盘,可是我却写成了D盘,而在服务器上安装的却是D盘,这个问题差点没发现,还有就是里面的“/”,开始写成了”\“

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值