📅  最后修改于: 2022-03-11 14:54:46.737000             🧑  作者: Mango
appendChild($descriptions->createElement("files")); while (($uploadedFile = UploadedFiles::fetchNext()) != null){ $sourceFile = $uploadedFile->getSourceFile(); $sourceFileName = $sourceFile->getFileName(); $descriptionsFile = $descriptions->createElement("file"); $descriptionsFile->setAttribute("name", $sourceFileName); $descriptionsFile->setAttribute("width", $sourceFile->getWidth()); $descriptionsFile->setAttribute("height", $sourceFile->getHeight()); $descriptionsFile->setAttribute("description", $uploadedFile->getDescription()); $descriptions->documentElement->appendChild($descriptionsFile); $sourceFile->save($galleryPath. "/" .$sourceFileName); } $descriptions->save("Descriptions.xml");?>