dqhnp44220 2014-12-08 01:15
浏览 24

在php中创建一个zip存档

I found this topic for creating a zip file froma folder: How to [recursively] Zip a directory in PHP?. Alix Axel's solution seems to work, but I always get the cull path of the folder inside the archive. I have tried to change all the '/'-s to '\'-s, but still, the problem exists. The code calling the function is the following:

    $exportdirname = "userpackages\\" . $_POST['exportname'] . '_' . $_SESSION['maps_username'];
    Zip($exportdirname . "\\", $exportdirname . '.zip');

What could possibly be the problem?

  • 写回答

0条回答 默认 最新

    报告相同问题?