简体   繁体   English

Uploadify在localhost中不起作用

[英]Uploadify doesn't work in localhost

uploadify plugin is not saving images at all on localhost , but it doesn't report any error. uploadify插件根本不会将图像保存在localhost ,但不会报告任何错误。 what can be the problem? 可能是什么问题?

This is my code 这是我的代码

<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>

and the call looks like this 通话看起来像这样

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

You need to specify the root location eg. 您需要指定根位置,例如。 /srv/www/include/uploadify/uploadify.php or whatever your directory is. /srv/www/include/uploadify/uploadify.php或任何目录。

Target file location is a folder, so Change this line: 目标文件位置是一个文件夹,因此请更改以下行:

'folder'    : 'images/profile',

to

'folder'    : 'images/profile/',

I found the solution. 我找到了解决方案。 it was problem because I was using absolute paths, and I should use relative. 这是有问题的,因为我使用的是绝对路径,应该使用相对路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM