亚洲国产第一_开心网五月色综合亚洲_日本一级特黄特色大片免费观看_久久久久久久久久免观看

Hello! 歡迎來到小浪云!


Jpgraph 3.5 中文亂碼問題解決


avatar
小浪云 2025-05-06 21

今天設(shè)置了jpgraph生成的圖表加上中文標(biāo)題亂碼,搜索下結(jié)果都是加什么字體了設(shè)置這個,修改那個。。后來看到這個文章:http://anshao.net/codes/254.html(多謝博主分享了,我轉(zhuǎn)載了過來,在windows是可以使用滴,但是linux下就不可以,我就增加下怎么在linux下使用吧)

具體做法就是:修改jpgraph_ttf.inc.php,找到185行:elseif( $aFF === FF_SIMSUN ) {

這個里面的內(nèi)容

elseif( $aFF === FF_SIMSUN ) {

// Do Chinese conversion if( $this->g2312 == null ) { include_once ‘jpgraph_gb2312.php’ ; $this->g2312 = new GB2312toUTF8(); } return $this->g2312->gb2utf8($aTxt); } 修改為: elseif( $aFF === FF_SIMSUN ) {

// Do Chinese conversion //注釋掉這段; /*if( $this->g2312 == NULL ) { include_once ‘jpgraph_gb2312.php’ ; $this->g2312 = new GB2312toUTF8(); } return $this->g2312->gb2utf8($aTxt); */ return $aTxt; //直接return }

Jpgraph 3.5 中文亂碼問題解決

如果提示這個,那么你可以點(diǎn)擊這里下載字體simhei.ttf然后保存到j(luò)pgraph文件夾的fonts下即可解決問題!

PS:所有文件代碼點(diǎn)擊下載

相關(guān)閱讀