douliang4858 2014-07-10 16:12
浏览 37

时间本地时间[关闭]

I just transfer my cms to new os server which as below:

Apache24 PHP5.5.14 MySql

When I login to management area with username and password on /index.php I press submit the page redirect to same page with blank page with showing number '1' on that page. Basicly it will redirect to main/manage.php .

I check php error log and found as below:

PHP Notice:  Use of undefined constant TIME_LOCAL_TIME - assumed 'TIME_LOCAL_TIME' in J:\WebDocs\gad\manage\index.php on line 15

Here is php code start with line 10 to 17

{
    $userId = getSessionArrayValue('UserId');
    $ip = getServerArrayValue('REMOTE_ADDR');
    $action = "Logged in user name: $username";
    $db->addlog($userId, $ip, $action, TIME_LOCAL_TIME);
    redirect("main/manage.php");
}

Is this issues relate to php version? what should I do to fix this.

  • 写回答

2条回答 默认 最新

  • doureng5668 2014-07-10 16:18
    关注

    I think TIME_LOCAL_TIME is constant defined in your OLD system. Is not a php error. It's clear a Warning. TIME_LOCAL_TIME is not defined. Searching "TIME_LOCAL_TIME" in php.net, I did not get any result. So, I think it's just and old configuration.

    I suggest to define constant in your code, and not in server. The reason is that if you change server, you must remember to fix configurations. Also, you can automate this stuff. Automatic, (can) remove the possibility of "failure" and/or human distractions.

    评论

报告相同问题?

悬赏问题

  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)