【发布时间】:2010-03-24 06:29:08
【问题描述】:
我在 image_graphviz 中收到警告,我查看了 post,他有类似的错误。 我已经安装了 pear image_graphviz 包(Image_GraphViz-1.2.1),我还在 windows 中安装了 graphviz.msi(Graphviz2.25.msi)(但我不知道 image_graphviz 是否有什么作用,当我使用 image_graphviz 时它是否有一些影响)。
我需要做点别的吗?
这是我在 pear image_graphviz 网站上的代码。
<?php
require_once 'Image/GraphViz.php';
error_reporting(E_ALL ^ E_NOTICE); //Added E_NOTICE
$gv = new Image_GraphViz();
$gv->addEdge(array('wake up' => 'visit bathroom'));
$gv->addEdge(array('visit bathroom' => 'make coffee'));
$gv->image();
?>
这是警告:
Warning: fopen(C:\WINDOWS\Temp\gra50.tmp.svg) [function.fopen]: failed to open stream: No such file or directory in C:\wamp\bin\php\php5.3.0\PEAR\Image\GraphViz.php on line 210
Notice: Undefined variable: data in C:\wamp\bin\php\php5.3.0\PEAR\Image\GraphViz.php on line 218
感谢 Pekka Gaiser,我使用了 error_reporting(E_ALL ^ E_NOTICE);。我不知道如何更改临时目录,但 c:/windows/temp 存在于我的计算机中。
我还没有解决问题。谢谢大家的建议。
【问题讨论】: