按照网络

把Chart.class.php放到..\ThinkPHP\Extend\Library\ORG\Util 目录下
把JpGraph.rar解压到..\ThinkPHP\Extend\Extend目录下
做一个简单的图表显示。始终无法完成测试,特发此贴。
控制器端我的方法是:
public function graph2() {
import('ORG.Util.Chart');
$chart = new Chart();
$ti
$data = array(20,27,45,75,90,10,80,100); //数据
$size = 140; //尺寸
$width = 750; //宽度
$height = 350; //高度
$legend = array("aaaa","bbbb","cccc","dddd","eeee","ffff","gggg","hhhh");//说明
$chart->createring($ti
}
页面模板端我的调用方式是:
<img src="{:U('Member/graph2')"/>
结果提示如下错误:
<h1>syntax error, unexpected '"/>
' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' E:\WebSite\Infohot\Amateur2\Cache\Runtime\Admin\Cache\cbe66c1375701586bca6c6501746fcc8.php 第 77 行.</h1>
<div class="content">
<div class="info">
<div class="ti
<h3>错误位置</h3>
</div>
<div class="text">
<p>FILE: E:\WebSite\Infohot\Amateur2\ThinkPHP\Lib\Core\Think.class.php LINE: 275</p>
</div>
</div>
<div class="info">
<div class="ti
<h3>TRACE</h3>
</div>
<div class="text">
<p>[14-01-03 16:45:01] E:\WebSite\Infohot\Amateur2\ThinkPHP\Lib\Core\Think.class.php (275) halt(syntax error, unexpected '"/> <br />
' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' E:\WebSite\Infohot\Amateur2\Cache\Runtime\Admin\Cache\cbe66c1375701586bca6c6501746fcc8.php 第 77 行.)<br/>[14-01-03 16:45:01] E:\WebSite\Infohot\Amateur2\ThinkPHP\Lib\Core\Think.class.php (290) Think::appError(4, syntax error, unexpected '"/> <br />
' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';', E:\WebSite\Infohot\Amateur2\Cache\Runtime\Admin\Cache\cbe66c1375701586bca6c6501746fcc8.php, 77)<br/>[14-01-03 16:45:01] () Think::fatalError()<br/></p>
</div>
</div>
</div>
请大家帮忙看看,我是哪一步添加错误。
最佳答案
