dsfsdfsdfsdfsdf45454 2014-12-07 20:20
浏览 15

从另一个php文件调用的PHP libchart部分工作

I just tried calling libchart example file(With added some test displays) directly it worked(Display 6 & Graph).

<?php
        echo "Display 1";
        include "../libchart/classes/libchart.php";
    echo "Display 1";
    include "../libchart/classes/libchart.php";
    echo "Display 2";

    $chart = new VerticalBarChart();
    echo "Display 3";

    $dataSet = new XYDataSet();
    echo "Display 4";
    $dataSet->addPoint(new Point("Jan 2005", 273));
    $dataSet->addPoint(new Point("Feb 2005", 421));
    $dataSet->addPoint(new Point("March 2005", 642));
    $dataSet->addPoint(new Point("April 2005", 800));
    $dataSet->addPoint(new Point("May 2005", 1200));
    $dataSet->addPoint(new Point("June 2005", 1500));
    $dataSet->addPoint(new Point("July 2005", 2600));
    $dataSet->addPoint(new Point("Aug 2005", 600));
    $chart->setDataSet($dataSet);
    echo "Display 5";
    //echo "Hello";
    $chart->setTitle("Monthly usage of www.example.com");
    $chart->render("generated/demo112.png");
    echo "Display 6";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--<html xmlns="http://www.w3.org/1999/xhtml">-->
<html>
<head>
        <title>Libchart vertical bars demonstration</title>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" />
</head>
<body>
        <img alt="Vertical bars chart" src="generated/demo112.png" style="border: 1px solid gray;"/>
</body>
</html>

Then tried calling from another php file, It worked fine(Display 6 & Graph).

<?php
include'VerticalBarChartTest.php';
?>

But when I tried it from another functional php file, Only Display 1&2 are displayed and doesn't move further. what could be the issue?

<?php
many logic...
include'VerticalBarChartTest.php';
?>

My logic are correct, When I comment the include file, my logic works fine. When I include this VerticalBarChartTest.php file call, it hangs with Display 2 message.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
    • ¥15 微信会员卡接入微信支付商户号收款
    • ¥15 如何获取烟草零售终端数据
    • ¥15 数学建模招标中位数问题
    • ¥15 phython路径名过长报错 不知道什么问题
    • ¥15 深度学习中模型转换该怎么实现
    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向