Home > Backend Development > PHP Tutorial > PHPExcel引入报错的问题

PHPExcel引入报错的问题

WBOY
Release: 2016-06-06 20:47:50
Original
1324 people have browsed it

有个项目需要引入PHPExcel类库,生成excel表格文档
在写测试样例的时候,没有问题
但是一引入我的项目,整个PHPExcel库就全部报错,

我include PHPExcel.php文件后

<code>// Set properties
echo date('H:i:s') . " Set properties\n";
$objPHPExcel->getProperties()->setCreator("Maarten Balliauw");
$objPHPExcel->getProperties()->setLastModifiedBy("Maarten Balliauw");
$objPHPExcel->getProperties()->setTitle("Office 2007 XLSX Test Document");
$objPHPExcel->getProperties()->setSubject("Office 2007 XLSX Test Document");
$objPHPExcel->getProperties()->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.");
</code>
Copy after login
Copy after login

“->"总是提示 syntax error unexpected '->'

这是什么情况啊,如何解决

PHPExcel引入报错的问题

回复内容:

有个项目需要引入PHPExcel类库,生成excel表格文档
在写测试样例的时候,没有问题
但是一引入我的项目,整个PHPExcel库就全部报错,

我include PHPExcel.php文件后

<code>// Set properties
echo date('H:i:s') . " Set properties\n";
$objPHPExcel->getProperties()->setCreator("Maarten Balliauw");
$objPHPExcel->getProperties()->setLastModifiedBy("Maarten Balliauw");
$objPHPExcel->getProperties()->setTitle("Office 2007 XLSX Test Document");
$objPHPExcel->getProperties()->setSubject("Office 2007 XLSX Test Document");
$objPHPExcel->getProperties()->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.");
</code>
Copy after login
Copy after login

“->"总是提示 syntax error unexpected '->'

这是什么情况啊,如何解决

PHPExcel引入报错的问题

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template