<?php
// the line below is only needed if the include path is not set on php.ini
ini_set("include path",ini_get("include path").":/usr/lib/phpreports/");
include once "PHPReportMaker.php";
$oRpt = new PHPReportMaker();
$oRpt->setUser("taq");
$oRpt->setPassword("******");
$oRpt->setXML("sales.xml");
$oRpt->run();
?>
// the line below is only needed if the include path is not set on php.ini
ini_set("include path",ini_get("include path").":/usr/lib/phpreports/");
include once "PHPReportMaker.php";
$oRpt = new PHPReportMaker();
$oRpt->setUser("taq");
$oRpt->setPassword("******");
$oRpt->setXML("sales.xml");
$oRpt->run();
?>
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\xampp\htdocs\test\sales.php on line 4
=>
include_once "PHPReportMaker.php"
按照jakey9826自由火的改,我修改时,漏了,原因还是我2楼回答的:<?php
// the line below is only needed if the include path is not set on php.ini
ini_set("include path",ini_get("include path").":/usr/lib/phpreports/");
include_once "PHPReportMaker.php";
$oRpt = new PHPReportMaker();
$oRpt->setUser("taq");
$oRpt->setPassword("******");
$oRpt->setXML("sales.xml");
$oRpt->run();
?>
不过我不太理解那个路径的问题Warning: include_once(PHPReportMaker.php) [function.include-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\test\sales.php on line 4Warning: include_once() [function.include]: Failed opening 'PHPReportMaker.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\test\sales.php on line 4Fatal error: Class 'PHPReportMaker' not found in C:\xampp\htdocs\test\sales.php on line 5请问我的路径该怎么设置?
加这个是将/usr/lib/phpreportsp这个路径加到include_path里,你是windows,当然没有这个路径了.或者在这里指明PHPReportMaker.php路径,这是首先.
或者在include_path加,但不是建议,因为不知道这个文件里是不是还要包含其它的文件.
加这个是将/usr/lib/phpreportsp这个路径加到include_path里,你是windows,当然没有这个路径了.或者在这里指明PHPReportMaker.php路径,这是首先.
或者在include_path加,但不是建议,因为不知道这个文件里是不是还要包含其它的文件.