Ich verwende den YUI 3 Uploader.
Ich nehme dieses Beispiel aus der angegebenen Referenz-URL:
http://yuilibrary.com/yui/docs/uploader/uploader-multiple.html
ich habe IE.8
Ausführung.
Ich habe eine PHP-Datei namens test.php erstellt und das Skript unter der angegebenen URL geschrieben unten angegeben:
<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
});
});
Wenn ich diese Seite im IE öffne, geschieht nichts, es wird kein Dateidialogfeld zum Auswählen der Datei geöffnet.
Wenn jemand dieses Problem bereits behoben hat, schlagen Sie mir bitte vor, wie ich das Problem lösen kann.
Vielen Dank,
Antworten:
0 für die Antwort № 1 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.