linux,GD庫已經開啟,是yum install安裝的
[root@VM-DEV-1 ~]# rpm -qa |grep php
php53u-pdo-5.3.28-5.ius.centos5
php53u-cli-5.3.28-5.ius.centos5
php53u-fpm-5.3.28-5.ius.centos5
php53u-xmlrpc-5.3.28-5.ius.centos5
php53u-gd-5.3.28-5.ius.centos5
php53u-common-5.3.28-5.ius.centos5
php53u-5.3.28-5.ius.centos5
php53u-xml-5.3.28-5.ius.centos5
php53u-mysql-5.3.28-5.ius.centos5
但是驗證碼還是不顯示
回複討論(解決方案)
單獨執行驗證碼檔案看行不行。
驗證碼是圖片,必須用 img 標記引用
驗證碼產生程式不能在 php 標記以外有任何輸出,包括 BOM 頭
驗證碼產生程式不能有 echo、print 等有文本輸出的語句,當然也不能有任何錯誤
注釋掉 header 語句,在瀏覽器中直接存取驗證碼產生程式,直到沒有錯誤為止
單獨執行驗證碼檔案看行不行。
一片白
驗證碼是圖片,必須用 img 標記引用
驗證碼產生程式不能在 php 標記以外有任何輸出,包括 BOM 頭
驗證碼產生程式不能有 echo、print 等有文本輸出的語句,當然也不能有任何錯誤
注釋掉 header 語句,在瀏覽器中直接存取驗證碼產生程式,直到沒有錯誤為止
這是剛裝上去的程式,本地好的,linux不行,就環境的區別
錯誤提示開啟看看。如果還不行,將header注釋掉看報什麼錯。
錯誤提示開啟看看。如果還不行,將header注釋掉看報什麼錯。
什麼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
1、php.ini 中設定下一下時區,或者用date_default_timezone_set()也可。
2、需要安裝 php-mbstring庫檔案才能使用mb_系列函數。可用命令 $ sudo yum install php-mbstring 安裝。
1、php.ini 中設定下一下時區,或者用date_default_timezone_set()也可。
2、需要安裝 php-mbstring庫檔案才能使用mb_系列函數。可用命令 $ sudo yum install php-mbstring 安裝。
1、php.ini 中設定下一下時區,或者用date_default_timezone_set()也可。
2、需要安裝 php-mbstring庫檔案才能使用mb_系列函數。可用命令 $ sudo yum install php-mbstring 安裝。
1、php.ini 中設定下一下時區,或者用date_default_timezone_set()也可。
2、需要安裝 php-mbstring庫檔案才能使用mb_系列函數。可用命令 $ sudo yum install php-mbstring 安裝。
3Q雖然不是那個命令,但是mbstring庫沒載入