0

我正在使用 YUI 3 上传器。
我从给定的参考网址中举了这个例子:http:
//yuilibrary.com/yui/docs/uploader/uploader-multiple.html

我有IE.8版本。
我创建了一个 php 文件说 test.php 并从给定的 url 编写了脚本,如下所示:

  <script src="http://yui.yahooapis.com/3.8.1/build/yui/yui-min.js"></script>
  <script>

  YUI({filter:"raw"}).use('uploader', function(Y) {
  Y.one("#overallProgress").set("text", "Uploader type: " + Y.Uploader.TYPE);
  if (Y.Uploader.TYPE != "none" && !Y.UA.ios) {
   var uploader = 
         new Y.Uploader({width: "250px",
               height: "35px",
               multipleFiles: true,
               swfURL: "http://localhost.com  /test/flashuploader.swf?t="  + Math.random(),
               uploadURL: "http://localhost.com/test/test.php",
               simLimit: 2,
               withCredentials: false
         });
  });

当我在 IE 中打开此页面时,没有任何反应,没有打开文件对话框来选择文件。

如果有人已经解决了这个问题,请建议我如何解决?

谢谢,

4

1 回答 1

0
   I have used all source code from below url:
   http://yuilibrary.com/yui/docs/uploader/uploader-multiple.html

   and 
   <script src="http://yui.yahooapis.com/3.8.1/build/yui/yui-min.js"></script>
   to    create instance the uploader.

   We need to just replace another version file of yui-min.js file as below
   <script src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js"></script>

   Apart from js file we need to change these 
   swfUrl: http://mudomain.com/test/flashuploader.swf
   UploadeUrl: http://mudomain.com/test/uploader.php

   To Upload file on the server, just write the script in the given above page in
    the  uploadUrl "uploader.php" as

   <?php
   $uploadedPath = 'Uploaded_Files/';
    foreach ($_FILES as $fieldName => $file) {
       move_uploaded_file($file['tmp_name'], $uploadedPath.$file['name']);
    }
    ?>

    Now you will see all selected files will be uploaded.

   But there is limitation in the IE, We can upload 1 to 5 files at a time.
于 2013-02-14T19:00:31.997 回答