【发布时间】:2014-11-20 02:25:28
【问题描述】:
我正在使用 LAMPP 运行 Ubuntu,但我不太了解如何设置库。当我运行一个示例时,我得到了这个错误:
警告:require_once(/opt/lampp/htdocs//phpChart_Lite//conf.php):无法打开流:/opt/lampp/htdocs/simulacion_tecnodi/phpChart_Lite/server/cls_conf 中不存在存档或目录.php(1) : eval()'d 代码在第 1 行
致命错误:require_once():在 /opt/lampp 中打开所需的 '/opt/lampp/htdocs//phpChart_Lite//conf.php' (include_path='.:/opt/lampp/lib/php') 失败/htdocs/simulacion_tecnodi/phpChart_Lite/server/cls_conf.php(1):第 1 行的 eval() 代码
示例代码:
<?php
require_once("../conf.php");
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>phpChart - Bar Test</title>
</head>
<body>
<div><span> </span><span id="info1b"></span></div>
<?php
$s1 = array(2, 6, 7, 10);
$ticks = array('a', 'b', 'c', 'd');
$pc = new C_PhpChartX(array($s1),'chart1');
$pc->add_plugins(array('highlighter','pointLabels'));
$pc->set_animate(true);
$pc->set_series_default(array(
'renderer'=>'plugin::BarRenderer',
'pointLabels'=> array('show'=>true)));
$pc->set_axes(array(
'xaxis'=>array(
'renderer'=>'plugin::CategoryAxisRenderer',
'ticks'=>$ticks)
));
$pc->set_highlighter(array('show'=>false));
$pc->bind_js('jqplotDataClick',array(
'series'=>'seriesIndex',
'point'=>'pointIndex',
'data'=>'data'));
$pc->draw(400,300);
?>
</body>
</html>
这里是conf.php文件代码:
<?php
define('SCRIPTPATH','/phpChart_Lite/');
define('DEBUG', true);
/******** DO NOT MODIFY ***********/
require_once('phpChart.php');
/**********************************/
?>
【问题讨论】:
-
请向我们展示您的代码!这是哪方面的问题
-
先检查你是否对文件有足够的权限!然后检查它是否在正确的目录中!
-
权限没问题我检查了
-
也在正确的目录中吗?同时显示配置文件中的代码!
-
好吧,这里是路径:opt/lampp/htdocs/xxxxx/phpChart_Lite/examples/bar_test.php 和 conf.php 路径:/opt/lampp/htdocs/xxxxx/phpChart_Lite/conf。 php