您好,欢迎访问一九零五行业门户网

Uploadify3.1下传5M以下文件显示成功,实际没下传成功

uploadify3.1上传5m以上文件显示成功,实际没上传成功
php uploadify3.1上传4m多的可以上传成功,上传大点的,进度条和提示都显示成功,但实际文件没上传成功,调试环境iis6
,可以确认路径没问题,操作应该也没问题,是不是uploadify本身不能上传大文件?还有没有其他好的上传大文件的php插件介绍。
js代码如下
jscript code$(function() { $('#file_upload').uploadify({ 'swf' : 'uploadify.swf', 'uploader' : 'uploadify.php', 'buttontext':'上传', 'auto' : false, 'height': 24, 'width': 50, 'cancelimage': 'uploadify-cancel.png', 'checkexisting':'check-exists.php', 'multi':false, 'filedataname': 'filedata', 'filetypedesc': 'flv视频文件和图片文件', 'filetypeexts':'*.flv;*.jpg;*.iso', 'onuploaderror' : function(file,errorcode,errormsg,errorstring,swfuploadifyqueue){ alert(errormsg);//上传文件出错是触发(每个出错文件触发一次) }, 'onuploadsuccess':function(file,data,response){ alert( 'id: ' + file.id+ ' - 索引: ' + file.index+ ' - 文件名: ' + file.name + ' - 文件大小: ' + file.size+ ' - 类型: ' + file.type+ ' - 创建日期: ' + file.creationdate+ ' - 修改日期: ' + file.modificationdate+ ' - 文件状态: ' + file.filestatus + ' - 服务器端消息: ' + data+ ' - 是否上传成功: ' + response); } // your options here }); });
php上传文件uploadify.php代码如下
php code$targetfolder = '/uploads'; // relative to the rootif (!empty($_files)) { $tempfile = $_files['filedata']['tmp_name']; $targetpath = $_server['document_root'] . $targetfolder; $targetfile = rtrim($targetpath,'/') . '/' . $_files['filedata']['name']; // validate the file type $filetypes = array('jpg','jpeg','gif','png','flv','iso'); // file extensions $fileparts = pathinfo($_files['filedata']['name']); if (in_array($fileparts['extension'],$filetypes)) { move_uploaded_file($tempfile,$targetfile); echo '1'; } else { echo 'invalid file type.'; }}
------解决方案--------------------
不是程序就是环境限制了上传大小
------解决方案--------------------
探讨
大哥可否说详细点 这个上传不上分块上传的吗?
如果不上分块的 估计肯定是上传不了的
------解决方案--------------------
if (!empty($_files)) {
if($_files['filedata']['error'] != 0) die('错误号:' . $_files['filedata']['error']);
$tempfile = $_files['filedata']['tmp_name'];
....
------解决方案--------------------
php.ini设置max_post_size大于等于5m就行了
其它类似信息

推荐信息