Php + flash + jQuery multi-image upload source code sharing _ php instance

Source: Internet
Author: User
This article mainly introduces php + flash + jQuery multi-image Upload implementation source code in detail, which has some reference value. if you are interested, you can refer to it. Flash + php multi-image UploadSource code, test successful, a classic Upload source code, why use flash as the upload component, in fact, not only flash, but also jquery technology, the purpose of this operation is to better facilitate image management. kids shoes who have used QQ space to upload images know that QQ space has a good uploading experience and it is very convenient to manage our uploaded images, the flash and jquery technologies are basically used.

Flash + jquery is used for front-end image upload and display. it also needs to be combined with php to upload the image to the specified target. here, php has two files, one upload. php is the core code for uploading, index. php integrates flash + php + jquery technology, uploads submitted images to the Directory upload, and also has a folder images, which is called upload.swf flash file and jquery. now that the js file is ready, the technology has been implemented, and the rest is how to integrate it with the database. I will not explain it here.

:

Key code:

Upload. php

<? Php $ uploaddir = 'upload/'; $ filename = date ("Ymdhis "). rand (100,999); $ uploadfile = $ uploaddir. $ filename. substr ($ _ FILES ['filedata'] ["name"], strrpos ($ _ FILES ['filedata'] ["name"], ". "); $ temploadfile = $ _ FILES ['filedata'] ['tmp _ name']; move_uploaded_file ($ temploadfile, $ uploadfile ); // return data processing in js on the page $ filedata = array ('result' => 'true ', 'name' => $ _ FILES ['filedata'] ["name"], 'filepath' => $ uploadfile,); echo json_encode ($ Filedata); exit;

Index. php

 Swfupload

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.