免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2059 | 回复: 9
打印 上一主题 下一主题

php 不能上传比较大的文件,只能上传小文件!高手救命! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-04-09 16:05 |只看该作者 |倒序浏览
<form enctype="multipart/form-data" action="<?php echo $SELF;?>;" method="post">;
<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />;
Send this file: <input name="userfile" type="file" />;
<input type="submit" value="Send File" />;
</form>;
<?php
// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead
// of $_FILES.


$uploaddir = '/var/www/localhost/htdocs/misuser/';
$uploadfile = $uploaddir . $_FILES['userfile']['name'];

print "<pre>;";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
        print "File is valid, and was successfully uploaded. ";
        print "Here's some more debugging info:\n";
        print_r($_FILES);
} else {
        print "ossible file upload attack!  Here's some debugging info:\n";
        print_r($_FILES);
}
print "</pre>;";

?>;


可以我发现我的程序,不能够上传比较大的文件,例如大于1M的,已经修改php.ini中的upload maxsize

论坛徽章:
0
2 [报告]
发表于 2004-04-12 10:02 |只看该作者

php 不能上传比较大的文件,只能上传小文件!高手救命!

高手,救命啊!

论坛徽章:
0
3 [报告]
发表于 2004-04-12 10:08 |只看该作者

php 不能上传比较大的文件,只能上传小文件!高手救命!

各位,大哥哥!救命啊!

论坛徽章:
0
4 [报告]
发表于 2004-04-12 12:48 |只看该作者

php 不能上传比较大的文件,只能上传小文件!高手救命!

<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />;
你怎么就没看见这个呢?

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
5 [报告]
发表于 2004-04-12 20:51 |只看该作者

php 不能上传比较大的文件,只能上传小文件!高手救命!

如果你这么喊,早就死定了

论坛徽章:
0
6 [报告]
发表于 2004-05-25 16:17 |只看该作者

php 不能上传比较大的文件,只能上传小文件!高手救命!

原帖由 "cyberteddy" 发表:
<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />;
你怎么就没看见这个呢?


这个值就算在大,还是不能上传啊!

论坛徽章:
0
7 [报告]
发表于 2004-05-26 10:55 |只看该作者

php 不能上传比较大的文件,只能上传小文件!高手救命!

是不是input 标签里" /"搞的 把它去了 试试

论坛徽章:
0
8 [报告]
发表于 2004-05-26 11:41 |只看该作者

php 不能上传比较大的文件,只能上传小文件!高手救命!

看看这篇文章:http://www.chinaunix.net/jh/14/114511.html

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
9 [报告]
发表于 2004-05-26 12:43 |只看该作者

php 不能上传比较大的文件,只能上传小文件!高手救命!

看看web服务器的相关配置。
还有http的超时设置。

论坛徽章:
0
10 [报告]
发表于 2004-08-25 11:33 |只看该作者

php 不能上传比较大的文件,只能上传小文件!高手救命!

假如是freebsd 在/etc/sysctl.conf中设net.inet.tcp.delayed_ack=0
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP