Php+ajax File Upload progress bar _php Tutorial

Source: Internet
Author: User
The code is divided into the following sections:

Demo.php (as the current mainstream development language)-upload process processing

PLAIN textphp (as the current mainstream development language):


Include UploadProgressMeter.class.php (as the current mainstream development language);

$fileWidget = new Uploadprogressmeter ();

if ($fileWidget->uploadcomplete ()) {
When the upload is complete, send a JS from the IFRAME to the main window to show everything OK
echo $fileWidget->finalstatus ();

Processing the uploaded file ...

Exit
}
?>

Demoserver.php (as the current mainstream development language)-Ajax (dynamic site static) service-side JS, using Pear:html_ajax (dynamic site static), directly call Uploadprogressmeterstatus class

PLAIN texthtml:



Renderincludejs ();?>

Style sheet for progress bar

PLAIN TEXTCSS:

. progressBar {
position:relative;
padding:2px;
width:300px;
height:40px;
font-size:14px;
}
. ProgressBar. Background {
Border:solid 1px black;
width:270px;
height:20px;
}
. ProgressBar. Bar {
position:relative;
Background-color:blue;
width:0px;
height:20px;
}

Form section

PLAIN texthtml:


Download

Author of SVN Browse

Other similar projects:
http://pdoru.from.ro/-compile with PHP (as the current mainstream development language) in patch form
http://www.ugia.cn/?p=54-Upload a file with a socket and display a progress bar

http://www.bkjia.com/PHPjc/508673.html www.bkjia.com true http://www.bkjia.com/PHPjc/508673.html techarticle The code is divided into the following sections: demo.php (as the current mainstream development language)-upload process processing PLAIN textphp (as the current mainstream development language): PHP (as the current mainstream development language ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.