Php + flash + jQuery multi-Image Upload source code sharing,

Source: Internet
Author: User

Php + flash + jQuery multi-Image Upload source code sharing,

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

<Html> 

In fact, this combination of upload technology is available on many large websites. It is mostly applied to image management. For example, the basic functions of image management in 51 spaces are similar, it is important to learn about the communication technology between flash and php. In large-scale development, this technology often appears.

Source code download: http://xiazai.jb51.net/201607/yuanma/php+flash (jb51.netw..rar

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.