无缘无故无法上传一些文件 [英] Can't upload some files for no reason

查看:105
本文介绍了无缘无故无法上传一些文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是< form enctype ="multipart/form-data" ...

上传文件.然后是php代码:

I use a form <form enctype="multipart/form-data"...

to upload files. And then the php code:

if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target_path))
            {
                echo "ok";
            }
            else
            {
             echo "not ok<br>";
            }



到目前为止,此表单已上传了10000多个文件(.apk类型-android apps).问题是,我现在注意到某些文件无法正常工作.我尝试将其重命名为1.apk(例如),这既不是大小问题,也不是权限(我只是为了确保在那些测试文件和目标路径上做了chmod 777),但是出于某种原因,为了那些绝对与其他文件相似的文件,但是我收到了不好的通知.

有人看到我没看到的东西吗?我的问题实际上是找不到问题模式,因此我可以解决它!

我有



This form so far have uploaded more than 10000 files (.apk type - android apps). Problem is, I noticed now that for some files don''t work. I tried rename it for 1.apk (for example), it''s not a size thing nor permission (i did a chmod 777 on those test files and on the target path just to make sure), but for some reason, for those files that are absolutely similars to the other ones, but I get the no ok notification.

Anyone is seeing something I''m not seeing ? My problem is really not finding a problem pattern so I can solve it!

I have

error_reporting(E_ALL);
            ini_set("display_errors", 1);



但是我什么也没得到,但是仍然不知道出了什么问题.也尝试过

if(copy($ HTTP_POST_FILES [''uploaded''] [''tmp_name''],$ target_path))

但仍不起作用.



But I get nothing, but still dont know what is the problem. Also tried

if(copy($HTTP_POST_FILES[''uploaded''][''tmp_name''], $target_path))

but still dont work.

推荐答案

_FILES [' 已上传'] [' tmp_name'],
_FILES['uploaded']['tmp_name'],


target_path)) { echo " ; } 其他 { 回声 " ; }
target_path)) { echo "ok"; } else { echo "not ok<br>"; }



到目前为止,此表单已上传了10000多个文件(.apk类型-android apps).问题是,我现在注意到某些文件无法正常工作.我尝试将其重命名为1.apk(例如),这既不是大小问题,也不是权限(我只是为了确保在那些测试文件和目标路径上做了chmod 777),但是出于某种原因,为了那些绝对与其他文件相似的文件,但是我收到了不好的通知.

有人看到我没看到的东西吗?我的问题实际上是找不到问题模式,因此我可以解决它!

我有



This form so far have uploaded more than 10000 files (.apk type - android apps). Problem is, I noticed now that for some files don''t work. I tried rename it for 1.apk (for example), it''s not a size thing nor permission (i did a chmod 777 on those test files and on the target path just to make sure), but for some reason, for those files that are absolutely similars to the other ones, but I get the no ok notification.

Anyone is seeing something I''m not seeing ? My problem is really not finding a problem pattern so I can solve it!

I have

error_reporting(E_ALL);
            ini_set("display_errors", 1);



但是我什么也没得到,但是仍然不知道出了什么问题.也尝试过

if(copy(



But I get nothing, but still dont know what is the problem. Also tried

if(copy(


HTTP_POST_FILES [''uploaded''] [''tmp_name''],
HTTP_POST_FILES[''uploaded''][''tmp_name''],


这篇关于无缘无故无法上传一些文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆