dongma7725 2016-04-25 05:07
浏览 36

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

As described in the documentation

I am trying to add files to a zip folder. The data for that files is saved with my PHP variables $remoteFile and $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');

When I load the page the Zip downloads automatically as intended. The file contents is there and everything is good. However, when I look on my server for the zip file, it is none existent.When I SSH into my server directly, or look via FTP and navigate to the 'assets/remote_files' directory for my website there is no zip file shown. I run 'ls -la' and no files.zip is shown.

Where is my zip file? Is it automatically deleting after it downloads?

Permissions:

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

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
    • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
    • ¥30 python代码,帮调试
    • ¥15 #MATLAB仿真#车辆换道路径规划
    • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
    • ¥15 数据可视化Python
    • ¥15 要给毕业设计添加扫码登录的功能!!有偿
    • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
    • ¥15 微信公众号自制会员卡没有收款渠道啊
    • ¥100 Jenkins自动化部署—悬赏100元