Uploadify在localhost中不起作用

时间:2011-12-26 00:46:28

标签: php jquery plugins uploadify

uploadify插件根本不会在localhost上保存图片,但它不会报告任何错误。可能是什么问题?

这是我的代码

<script type="text/javascript">
$(document).ready(function()
{   

    $('#file_upload').uploadify({   
        'uploader'  : 'include/uploadify/uploadify.swf',
        'script'    : 'include/uploadify/uploadify.php',
        'cancelImg' : 'include/uploadify/cancel.png',
        'folder'    : 'images/profile',
        'auto'      : true,
        'multi'     : false
    });
});
</script>

并且通话看起来像这样

<input id="file_upload" name="file_upload" type="file" />   

3 个答案:

答案 0 :(得分:2)

您需要指定根位置,例如。 /srv/www/include/uploadify/uploadify.php 或者你的目录是什么。

答案 1 :(得分:1)

目标文件位置是一个文件夹,因此请更改此行:

'folder'    : 'images/profile',

'folder'    : 'images/profile/',

答案 2 :(得分:0)

我找到了解决方案。这是问题,因为我使用绝对路径,我应该使用亲戚。