简单使用 后取消链接,如下所示:$inputFileName = './sampleData/example1.xls';/** Identify the type of $inputFileName **/$inputFileType = \PhpOffice\PhpSpreadsheet\IOFactory::identify($inputFileName);/** Create a new Reader of the type that has been identified **/$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);/** Load $inputFileName to a Spreadsheet Object **/$spreadsheet = $reader->load($inputFileName);//DO WHAT YOU WANTunlink($inputFileName); // delete file