我正在使用PHPExcel为我的PHP应用程序生成一个列表。
//Nothing significant before if
if($type == "StudentList")
{
PHPExcel $ex = new PHPExcel();
$ex->getProperties()->setTitle("Student List.xlsx");
//rest of the code follows
在PHPExcel $ex = new PHPExcel();
行,我收到一个错误,说unexpected T_VARIABLE
.我已经包含了 PHPExcel.php 文件的路径,也包含了该文件。我似乎不明白错误可能是什么?非常感谢任何帮助,提前感谢。
试试这个。它有效
if($type == "StudentList") {
//PHPExcel
$ex = new PHPExcel();
$ex->getProperties()->setTitle("Student List.xlsx");
}