解决方案 »

  1.   

    验证码是图片,必须用 img 标记引用
    验证码生成程序不能在 php 标记以外有任何输出,包括 BOM 头
    验证码生成程序不能有 echo、print 等有文本输出的语句,当然也不能有任何错误
    注释掉 header 语句,在浏览器中直接访问验证码生成程序,直到没有错误为止
      

  2.   

    这是刚装上去的程序,本地好的,linux不行,就环境的区别
      

  3.   

    错误提示打开看看。如果还不行,将header注释掉看报什么错。
      

  4.   

    什么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 
     
      

  5.   

    1、php.ini 中设置下一下时区,或者用date_default_timezone_set()也可。
    2、需要安装 php-mbstring库文件才能使用mb_系列函数。可用命令 $ sudo yum install php-mbstring  安装。
      

  6.   

    3Q虽然不是那个命令,但是mbstring库没加载