dongpiao1983 2014-01-19 10:54
浏览 8
已采纳

提取存储在用户帐户中的zip文件

Is it possible to extract a zip file stored in server using php file operations. The zip file has to be unzipped, I know the location of the file inside server so how can the file will be used for the process. Note- Users don't upload any data they just gives the different textual information which is stored as a zip file and it cannot be used to store in database.

Edit1-can we give html's input tag a DEFAULT PATH of file which has to be uploaded so user will not have to select a file they will just need to press upload button

  • 写回答

1条回答 默认 最新

  • dongqing4774 2014-01-19 11:20
    关注
    $zip = new ZipArchive;
    
    $res = $zip->open('file.zip');
    
    if ($res === TRUE) 
    {
        $zip->extractTo('/extract_path/');
        $zip->close();
    } 
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 关于用python写支付宝扫码付异步通知收不到的问题
  • ¥50 vue组件中无法正确接收并处理axios请求
  • ¥15 隐藏系统界面pdf的打印、下载按钮
  • ¥15 MATLAB联合adams仿真卡死如何解决(代码模型无问题)
  • ¥15 基于pso参数优化的LightGBM分类模型
  • ¥15 安装Paddleocr时报错无法解决
  • ¥15 python中transformers可以正常下载,但是没有办法使用pipeline
  • ¥50 分布式追踪trace异常问题
  • ¥15 人在外地出差,速帮一点点
  • ¥15 如何使用canvas在图片上进行如下的标注,以下代码不起作用,如何修改