Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 20
  1. #1

    upload con bar progress

    ciao a tutti. cerco disperatamente uno script per fare upload con bar progress.

    non so se è la sezione giusta, se non lo è spostatemi e chiedo cusa in anticipo.

  2. #2
    Utente di HTML.it L'avatar di gianiaz
    Registrato dal
    May 2001
    Messaggi
    8,027
    secondo me il migliore da utilizzare/configurare è swfupload.

    www.swfupload.org.

    ciao

  3. #3
    grazie mille, ma io non riesco a farlo andare....

    ho visto il demo e devo dire che è perfetto.
    ma non riesco a farlo andare uff

    l'ho scaricato da qui .

    potresti aiutarmi

  4. #4
    Utente di HTML.it L'avatar di gianiaz
    Registrato dal
    May 2001
    Messaggi
    8,027
    nel demo ci sono gli esempi, se non hai dimestichezza con la programmazione è difficile aiutarti.. .

    Se vuoi qualcuno che ti faccia il lavoro prova a postare sul forum delle offerte di lavoro, altrimenti prova a spiegare quali sono i problemi che hai riscontrato, e si prova a darti una mano.

    Innanzi tutto hai idea di come funzioni un upload in php?

    ciao

  5. #5
    si,
    ma in primis, quale è la pseudo - index??

  6. #6
    ok scusa nn avevo capito.

    allora , io sono nella cartella demos...

    provo il multiinstancedemo, ma appena scelgo il file dal browse, mi appare un errore


    Server (IO) Error


    non so cosa sia

  7. #7
    Utente di HTML.it L'avatar di gianiaz
    Registrato dal
    May 2001
    Messaggi
    8,027
    ma stai lanciando lo script da un url oppure da una directory qualsiasi?

    (cioè l'url è http://localhost o C://file)?

    Hai mai programmato in php?

    ciao

  8. #8
    certo che sono in localhost...
    e php funziona perfettamente

  9. #9
    Utente di HTML.it L'avatar di gianiaz
    Registrato dal
    May 2001
    Messaggi
    8,027
    swfupload chiama una pagina php, non è che lo conosca benissimo, ma credo che quell'errore sia dato da una risposta errata della pagina php, magari posta un po' di codice.


  10. #10
    prima di tutto ti ringrazio già del tempo

    questa è la index.php


    Codice PHP:
    <?php
        session_start
    ();

        if (
    count($_FILES)) {
            
    // Handle degraded form uploads here.  Degraded form uploads are POSTed to index.php.  SWFUpload uploads
            // are POSTed to upload.php
        
    }

    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title>SWFUpload Demos - Multi-Instance Demo</title>
    <link href="../css/default.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../swfupload/swfupload.js"></script>
    <script type="text/javascript" src="js/swfupload.graceful_degradation.js"></script>
    <script type="text/javascript" src="js/swfupload.queue.js"></script>
    <script type="text/javascript" src="js/fileprogress.js"></script>
    <script type="text/javascript" src="js/handlers.js"></script>
    <script type="text/javascript">
            var upload1, upload2;

            window.onload = function() {
                upload1 = new SWFUpload({
                    // Backend Settings
                    upload_url: "../multiinstancedemo/upload.php",    // Relative to the SWF file (or you can use absolute paths)
                    post_params: {"PHPSESSID" : "<?php echo session_id(); ?>"},

                    // File Upload Settings
                    file_size_limit : "102400",    // 100MB
                    file_types : "*.*",
                    file_types_description : "All Files",
                    file_upload_limit : "10",
                    file_queue_limit : "0",

                    // Event Handler Settings (all my handlers are in the Handler.js file)
                    file_dialog_start_handler : fileDialogStart,
                    file_queued_handler : fileQueued,
                    file_queue_error_handler : fileQueueError,
                    file_dialog_complete_handler : fileDialogComplete,
                    upload_start_handler : uploadStart,
                    upload_progress_handler : uploadProgress,
                    upload_error_handler : uploadError,
                    upload_success_handler : uploadSuccess,
                    upload_complete_handler : uploadComplete,

                    // Flash Settings
                    flash_url : "../swfupload/swfupload_f8.swf",    // Relative to this file (or you can use absolute paths)
                    
                    swfupload_element_id : "flashUI1",        // Setting from graceful degradation plugin
                    degraded_element_id : "degradedUI1",    // Setting from graceful degradation plugin

                    custom_settings : {
                        progressTarget : "fsUploadProgress1",
                        cancelButtonId : "btnCancel1"
                    },
                    
                    // Debug Settings
                    debug: false
                });

                upload2 = new SWFUpload({
                    // Backend Settings
                    upload_url: "../multiinstancedemo/upload.php",    // Relative to the SWF file (or you can use absolute paths)
                    post_params: {"PHPSESSID" : "<?php echo session_id(); ?>"},

                    // File Upload Settings
                    file_size_limit : "200",    // 200 kb
                    file_types : "*.jpg;*.gif;*.png",
                    file_types_description : "Image Files",
                    file_upload_limit : "10",
                    file_queue_limit : "2",

                    // Event Handler Settings (all my handlers are in the Handler.js file)
                    file_dialog_start_handler : fileDialogStart,
                    file_queued_handler : fileQueued,
                    file_queue_error_handler : fileQueueError,
                    file_dialog_complete_handler : fileDialogComplete,
                    upload_start_handler : uploadStart,
                    upload_progress_handler : uploadProgress,
                    upload_error_handler : uploadError,
                    upload_success_handler : uploadSuccess,
                    upload_complete_handler : uploadComplete,

                    // Flash Settings
                    flash_url : "../swfupload/swfupload_f8.swf",    // Relative to this file (or you can use absolute paths)

                    swfupload_element_id : "flashUI2",        // Setting from graceful degradation plugin
                    degraded_element_id : "degradedUI2",    // Setting from graceful degradation plugin

                    custom_settings : {
                        progressTarget : "fsUploadProgress2",
                        cancelButtonId : "btnCancel2"
                    },

                    // Debug Settings
                    debug: false
                });

             }
        </script>
    </head>
    <body>
    <div id="header">
        <h1 id="logo">[url="../"]SWFUpload[/url]</h1>
        <div id="version">v2.1.0 Beta</div>
    </div>
    <div id="content">
        <h2>Multi-Instance Demo</h2>
        <form id="form1" action="index.php" method="post" enctype="multipart/form-data">
            

    This page demonstrates how multiple instances of SWFUpload can be loaded on the same page.
                It also demonstrates the use of the graceful degradation plugin and the queue plugin.</p>
            <table>
                <tr valign="top">
                    <td><div id="flashUI1" style="display: none;">
                            <fieldset class="flash" id="fsUploadProgress1">
                            <legend>Large File Upload Site</legend>
                            </fieldset>
                            <div>
                                <input type="button" value="Upload file (Max 100 MB)" onclick="upload1.selectFiles()" style="font-size: 8pt;" />
                                <input id="btnCancel1" type="button" value="Cancel Uploads" onclick="cancelQueue(upload1);" disabled="disabled" style="font-size: 8pt;" />
                                

                            </div>
                        </div>
                        <div id="degradedUI1">
                            <fieldset>
                            <legend>Large File Upload Site</legend>
                            <input type="file" name="anyfile1" />
                            (Any file, Max 100 MB)

                            </fieldset>
                            <div>
                                <input type="submit" value="Submit Files" />
                            </div>
                        </div></td>
                    <td><div id="flashUI2" style="display: none;">
                            <fieldset class="flash" id="fsUploadProgress2">
                            <legend>Small File Upload Site</legend>
                            </fieldset>
                            <div>
                                <input type="button" value="Upload file (Max 200KB)" onclick="upload2.selectFiles()" style="font-size: 8pt;" />
                                <input id="btnCancel2" type="button" value="Cancel Uploads" onclick="cancelQueue(upload2);" disabled="disabled" style="font-size: 8pt;" />
                                

                            </div>
                        </div>
                        <div id="degradedUI2">
                            <fieldset>
                            <legend>Small File Upload Site</legend>
                            <input type="file" name="anyfile2" />
                            (Any file, Max 200KB)

                            </fieldset>
                            <div>
                                <input type="submit" value="Submit Files" />
                            </div>
                        </div></td>
                </tr>
            </table>
        </form>
    </div>
    </body>
    </html>
    mentre questa e la pagina upload.php


    Codice PHP:
    <?php
        
    if (isset($_POST["PHPSESSID"])) {
            
    session_id($_POST["PHPSESSID"]);
        }
        
    session_start();

        if (!isset(
    $_FILES["Filedata"]) || !is_uploaded_file($_FILES["Filedata"]["tmp_name"]) || $_FILES["Filedata"]["error"] != 0) {
            
    // Usually we'll only get an invalid upload if our PHP.INI upload sizes are smaller than the size of the file we allowed
            // to be uploaded.
            
    header("HTTP/1.1 500 File Upload Error");
            if (isset(
    $_FILES["Filedata"])) {
                echo 
    $_FILES["Filedata"]["error"];
            }
            exit(
    0);
        }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
        <title>SWFUpload v2.0 Multi-Upload Demo</title>
    </head>
    <body>
        

    Upload Page</p>
    </body>
    </html>
    poi ci sono 4 file js

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.