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.