【问题标题】:Uploadify in Zend Framework在 Zend 框架中上传
【发布时间】:2011-09-28 06:52:37
【问题描述】:

我在zend中使用uplodify上传文件。

<link href="/uploadify/uploadify.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/uploadify/jquery-1.5.2.min.js"></script>
<script type="text/javascript" src="/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="/uploadify/swfobject.js"></script>
<script type="text/javascript" src="/uploadify/jquery.uploadify.js"></script>
<script type="text/javascript">
$(document).ready(function () {    
      $('#file_upload').uploadify({
        'uploader': '/uploadify/uploadify.swf',
        'script': '/upload/upload',
        'cancelImg': '/uploadify/cancel.png',
        'folder': '/uploadify/uploads',
        'auto': true
      });


});
 </script>
 <input id="file_upload" name="file_upload" type="file" />

此代码在视图部分 index.phtml 中。 但是当我运行我的网络应用程序时,我在我的网络开发工具中看到它显示在控制台中

NetworkError: 404 Not Found - http://localhost/upload/uploadify.swf?preventswfcaching=1317192234400

帮我解决这个问题....

【问题讨论】:

    标签: zend-framework file-upload uploadify swfupload


    【解决方案1】:

    “一些选项名称在 v3 中已更改为更直观。'uploader' 选项现在应该指向 php 脚本。'swf' 选项将指向 flash 文件。”

    http://www.uploadify.com/forums/discussion/7296/uploader-being-rewritten-in-v3.0.0/p1

    部分代码:

    $("#gallery").uploadify({
    
        id : jQuery(this).attr('id'), 
        langFile : 'http://www.static-xxx.nu/uploader/uploadifyLang_en.js',
        swf : 'http://www.static-xxx.nu/uploader/uploadify.swf', 
        uploader : '/uploadify/galleri.php',
    

    【讨论】:

      【解决方案2】:

      指定的路径在某处是错误的。

      在jquery函数中,给出为;

      'uploader': '/uploadify/uploadify.swf',

      检查“upload/uploadify.swf”的请求来自何处以获取 404 错误。

      另外,如果您使用的是 .htaccess 文件,请确保对这些文件的请求未被拒绝。

      【讨论】:

        猜你喜欢
        • 2011-05-30
        • 1970-01-01
        • 2023-03-13
        • 2011-12-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多