我找到了一些与我有同样问题的帖子,但是,没有解决方案.我不是100%确定如何做到这一点,但希望你能提供帮助.
我正在尝试使用Uploadify上传文件,但会发生以下情况:
不确定这是怎么可能的 - 据我所知,一切都是正确的.
这是我的代码:
<script type="text/javascript">
$(document).ready(function() {
$("#addimage").validationEngine();
$('#imagefile').uploadify({
'uploader': "/js/uploadify/uploadify.swf",
'fileExt': "*.jpg;*.jpeg;*.png;*.gif",
'buttonText': "Browse...",
'script': "/js/uploadify/uploadify.php",
'cancelImg': "/js/uploadify/cancel.png",
'folder': "/uploads",
'fileDesc': 'Only *.jpg, *.jpeg, *.png, *.gif are allowed',
'auto': true,
'onComplete': function(event, ID, fileObj, response, data) {
$('#name').val('Please edit this text to add a description...');
alert('Uploaded ' + fileObj.name + ' to ' + fileObj.filePath + '.');
}
});
});
</script>
<input type="file" id="imagefile" name="imagefile" />
<?php
if …Run Code Online (Sandbox Code Playgroud)