duan0403788996 2009-06-06 19:46
浏览 44
已采纳

上传.zip时,$ _FILES数组在php中为空,而.jpg工作正常

I am running php 5.3, and have bumped into a problem I've not encountered before. I have an upload form (yes, enctype is set to multipart/form-data), that posts stuff to a php page.

The php installation has uploads enabled, and upload_max_filesize is set to .5GB.

Uploading pictures (I've tried up to 50 at a time) works fine. Uploading .zip files, however, does not. Uploading a .zip will render most global input arrays ($_POST,$_GET,$_FILES, and $_REQUEST) completely empty. A network sniff shows POST data beeing sent, as well as the zip beeing uploaded.

Apache logs show nothing out of the ordinary, and no errors are encountered. The arrays are just empty. Has anyone encountered this?

  • 写回答

3条回答 默认 最新

  • duandai3964 2009-06-06 19:56
    关注

    I don't have a clue what the exact problem could be, but I'd suggest trying out a few modifications on the files:

    • can you upload a .jpg file that you've renamed to .zip?
    • can you upload a .zip file that you've renamed to .jpg?
    • try uploading a smaller .zip file, just to make sure it does actually get transfered.
    • try uploading a .jpg with a bigger filesize

    Hopefully this will give a pointer about where the problem lies. For what it is worth, I doubt that the problem is in PHP.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题