什么header,加了error_reporting(E_ALL);ini_set("display_errors","On");访问验证码php会报这个 Warning: _08_Verification_Code::CreateImage(): 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 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /data/www/syslog/teapi.jysq.cn/cmsauto/include/verification_code.php on line 252 Fatal error: Call to undefined function mb_convert_encoding() in /data/www/syslog/teapi.jysq.cn/cmsauto/include/verification_code.php on line 252
验证码生成程序不能在 php 标记以外有任何输出,包括 BOM 头
验证码生成程序不能有 echo、print 等有文本输出的语句,当然也不能有任何错误
注释掉 header 语句,在浏览器中直接访问验证码生成程序,直到没有错误为止
Warning: _08_Verification_Code::CreateImage(): 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 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /data/www/syslog/teapi.jysq.cn/cmsauto/include/verification_code.php on line 252 Fatal error: Call to undefined function mb_convert_encoding() in /data/www/syslog/teapi.jysq.cn/cmsauto/include/verification_code.php on line 252
2、需要安装 php-mbstring库文件才能使用mb_系列函数。可用命令 $ sudo yum install php-mbstring 安装。