Build Tar file from directory in PHP without exec/passthru

前端 未结 4 947
面向向阳花
面向向阳花 2021-01-02 06:19

So I have a client who\'s current host does not allow me to use tar via exec()/passthru()/ect and I need to backup the site periodicly and programmaticly so is there a solut

4条回答
  •  无人及你
    2021-01-02 07:24

    PHP 5.3 offers a much easier way to solve this issue.

    Look here: http://www.php.net/manual/en/phardata.buildfromdirectory.php

    buildFromDirectory(dirname(__FILE__) . '/project');
    ?>
    

提交回复
热议问题