Codeigniter Zip编码 - 我的zip文件夹在哪里?

时间:2016-04-25 05:07:10

标签: php zip codeigniter-3

documentation

中所述

我正在尝试将文件添加到zip文件夹中。该文件的数据与我的PHP变量$ remoteFile和$ data。

一起保存
//Archive the Generated files into Zip for future download
$this->load->library('zip');

$zipFiles = array(
    'index.php' => $remoteFile,
    'assets/remote.php' => $data
);

$this->zip->add_data($zipFiles);
$this->zip->archive(base_url() . 'assets/remote_files/files.zip');
$this->zip->download(base_url() . 'assets/remote_files/files.zip');

当我加载页面时,Zip会按预期自动下载。文件内容在那里,一切都很好。但是,当我在我的服务器上查找zip文件时,它是不存在的。当我直接通过SSH连接到我的服务器,或通过FTP查看并导航到资产/ remote_files'我的网站目录没有显示zip文件。我跑了' ls -la'并且没有显示files.zip。

我的zip文件在哪里?下载后会自动删除吗?

权限:

:~/www-dev/site/assets$ ls -la | grep remote_files
drwxrwxrwx 2 www-data admin 4096 Apr 25 00:30 remote_files

0 个答案:

没有答案