$year=date(Y);
这样写有错吗?
错误提示:
Notice: Use of undefined constant Y - assumed 'Y' in C:\Apache2\htdocs\content\spinklogmanage.php on line 16

解决方案 »

  1.   

    1变量不用定义类型即可使用
    但是使用未赋值的变量会有提示,不是出错
    变量在使用之前最后先初始化,规范
    2 $year=date("Y");
      

  2.   

    可能,你的error_reporting的等级设置的太敏感了吧?
      

  3.   

    不错,你的仅仅是notice,不是error。
      

  4.   

    那我应把error_reporting的等级设置为多少呢?
      

  5.   

    error_reporting = E_ALL & ~E_NOTICEashchen(陈辉) :这一点我也要注意;