需要绝对路径以在适用于PHPExcel的AWS Ec2 Linux中保存excel文件。
$excel_path = '/var/www/html/MyProject/public/SubmittedSheets/'.$userId.'-'.uniqid().'.xlsx'; $objWriter->save($excel_path);