跪求神解 jpgraph配置
发表在PHP图书答疑
2013-07-22
是否精华
是
否
版块置顶:
是
否
[font size=6][font size=4][font face=宋体]jpgraph3.5如何配置? jpg-config.ini.php[/font][/font][/font]
php.ini文本的配置
; When safe_mode is on, UID/GID checks are bypassed when
; including files from this directory and its subdirectories.
; (directory must also be in include_path=".;D:\shujuku\AppServ\www\jpgraph" or full path must
; be used when including)
safe_mode_include_dir =
我的代码
<?php
include_once ("jpgraph/jpgraph.php");
include_once ("jpgraph/jpgraph_pie.php");
include_once ("jpgraph/jpgraph_pie3d.php"); //引用3D饼图PiePlot3D对象所在的类文件
$data = array(266036,295621,335851,254256,254254,685425); //定义数组
[font color=#FF0000]$graph = new PieGraph(540,260,'auto');[/font] //创建画布
$graph->SetShadow(); //设置画布阴影
$graph->title->Set("应用3D饼形图统计2009年商品的年销售额比率"); //创建标题
$graph->title->SetFont(FF_SIMSUN,FS_BOLD); //设置标题字体
$graph->legend->SetFont(FF_SIMSUN,FS_NORMAL); //设置图例字体
$p1 = new PiePlot3D($data); //创建3D饼形图对象
$p1->SetLegends(array("IT数码","家电通讯","家居日用","服装鞋帽","健康美容","食品烟酒"));
$targ=array("pie3d_csimex1.php?v=1","pie3d_csimex1.php?v=2","pie3d_csimex1.php?v=3",
"pie3d_csimex1.php?v=4","pie3d_csimex1.php?v=5","pie3d_csimex1.php?v=6");
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");
$p1->SetCSIMTargets($targ,$alts);
$p1->SetCenter(0.4,0.5); //设置饼形图所在画布的位置
$graph->Add($p1); //将3D饼图形添加到图像中
$graph->StrokeCSIM(); //输出图像到浏览器
?>
预览的提示
Warning: include_once(jpgraph/jpgraph.php) [function.include-once]: failed to open stream: No such file or directory in D:\shujuku\AppServ\www\mr\01\index.php on line 2
Warning: include_once() [function.include]: Failed opening 'jpgraph/jpgraph.php' for inclusion (include_path='.;C:\php5\pear') in D:\shujuku\AppServ\www\mr\01\index.php on line 2
Warning: include_once(jpgraph/jpgraph_pie.php) [function.include-once]: failed to open stream: No such file or directory in D:\shujuku\AppServ\www\mr\01\index.php on line 3
Warning: include_once() [function.include]: Failed opening 'jpgraph/jpgraph_pie.php' for inclusion (include_path='.;C:\php5\pear') in D:\shujuku\AppServ\www\mr\01\index.php on line 3
Warning: include_once(jpgraph/jpgraph_pie3d.php) [function.include-once]: failed to open stream: No such file or directory in D:\shujuku\AppServ\www\mr\01\index.php on line 4
Warning: include_once() [function.include]: Failed opening 'jpgraph/jpgraph_pie3d.php' for inclusion (include_path='.;C:\php5\pear') in D:\shujuku\AppServ\www\mr\01\index.php on line 4
Fatal error: Class 'PieGraph' not found in D:\shujuku\AppServ\www\mr\01\index.php on line 7
php.ini文本的配置
; When safe_mode is on, UID/GID checks are bypassed when
; including files from this directory and its subdirectories.
; (directory must also be in include_path=".;D:\shujuku\AppServ\www\jpgraph" or full path must
; be used when including)
safe_mode_include_dir =
我的代码
<?php
include_once ("jpgraph/jpgraph.php");
include_once ("jpgraph/jpgraph_pie.php");
include_once ("jpgraph/jpgraph_pie3d.php"); //引用3D饼图PiePlot3D对象所在的类文件
$data = array(266036,295621,335851,254256,254254,685425); //定义数组
[font color=#FF0000]$graph = new PieGraph(540,260,'auto');[/font] //创建画布
$graph->SetShadow(); //设置画布阴影
$graph->title->Set("应用3D饼形图统计2009年商品的年销售额比率"); //创建标题
$graph->title->SetFont(FF_SIMSUN,FS_BOLD); //设置标题字体
$graph->legend->SetFont(FF_SIMSUN,FS_NORMAL); //设置图例字体
$p1 = new PiePlot3D($data); //创建3D饼形图对象
$p1->SetLegends(array("IT数码","家电通讯","家居日用","服装鞋帽","健康美容","食品烟酒"));
$targ=array("pie3d_csimex1.php?v=1","pie3d_csimex1.php?v=2","pie3d_csimex1.php?v=3",
"pie3d_csimex1.php?v=4","pie3d_csimex1.php?v=5","pie3d_csimex1.php?v=6");
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");
$p1->SetCSIMTargets($targ,$alts);
$p1->SetCenter(0.4,0.5); //设置饼形图所在画布的位置
$graph->Add($p1); //将3D饼图形添加到图像中
$graph->StrokeCSIM(); //输出图像到浏览器
?>
预览的提示
Warning: include_once(jpgraph/jpgraph.php) [function.include-once]: failed to open stream: No such file or directory in D:\shujuku\AppServ\www\mr\01\index.php on line 2
Warning: include_once() [function.include]: Failed opening 'jpgraph/jpgraph.php' for inclusion (include_path='.;C:\php5\pear') in D:\shujuku\AppServ\www\mr\01\index.php on line 2
Warning: include_once(jpgraph/jpgraph_pie.php) [function.include-once]: failed to open stream: No such file or directory in D:\shujuku\AppServ\www\mr\01\index.php on line 3
Warning: include_once() [function.include]: Failed opening 'jpgraph/jpgraph_pie.php' for inclusion (include_path='.;C:\php5\pear') in D:\shujuku\AppServ\www\mr\01\index.php on line 3
Warning: include_once(jpgraph/jpgraph_pie3d.php) [function.include-once]: failed to open stream: No such file or directory in D:\shujuku\AppServ\www\mr\01\index.php on line 4
Warning: include_once() [function.include]: Failed opening 'jpgraph/jpgraph_pie3d.php' for inclusion (include_path='.;C:\php5\pear') in D:\shujuku\AppServ\www\mr\01\index.php on line 4
Fatal error: Class 'PieGraph' not found in D:\shujuku\AppServ\www\mr\01\index.php on line 7