Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个创建 KML 文件的自定义 php 脚本。现在如何将其转换为 KMZ?
我应该直接跑gzcompress()吗?
gzcompress()
或者我应该创建一个 ZipArchive?
创建一个 ZipArchive 工作。我将已创建的 kml 文件添加到其中。
$zip = new ZipArchive(); $zip_name = "c:\\kml\\".$sFilename.".kmz"; $filename = "c:\\kml\\".$sFilename.".kml"; $zip->open($zip_name, ZIPARCHIVE::CREATE); $zip->addFile($filename); $zip->close();