1.首先设置字体,如标题:
2.修改JPgraph的jpgraph_ttf.inc.php
这段代码位于180行左右
- 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;
- }
把其他代码注释掉直接返回 $aTxt 即可。亲测成功!网上很多帖子都不行,修改注意备份好。