PHP Simple implementation of the method of bulk upload pictures,
This paper introduces a simple way to implement bulk upload images in PHP. Share to everyone for your reference, as follows:
<?phpfunction Upload_multi ($path, $photo, $i) {$uploaddir = './'. $path;//file directory if (!file_exists ($uploaddir))// If the directory does not exist, create a new $uploaddir=mkdir ($uploaddir), $piece = Explode ('. ', $photo [' name '] [$i]); $uploadfile = $uploaddir. '/'. MD5 ($piece [0]). $piece [1]; $result = Move_uploaded_file ($photo [' tmp_name '] [$i], $uploadfile), if (! $result) {exit (' upload failed ');} Return basename ($uploadfile);} if ($_post[' Tijiao ')) {extract ($_post), $i =0;foreach ($_files["Pictures" ["Error"] as $key = $error) {if ($error = = UPLOAD_ERR_OK) {Upload_multi ($email, $_files["Pictures"], $i);} $i + +;}}? >
More about PHP related content readers can view the topic: "PHP File Operation Summary", "PHP operation and operator Usage Summary", "PHP Network Programming Skills Summary", "PHP Basic Grammar Introductory Tutorial", "PHP operation Office Document tips summary (including word, excel,access,ppt), "PHP Date and Time usage summary", "PHP primer for Object-oriented programming", "PHP String Usage Summary", "Getting Started with Php+mysql database operations" and "PHP Common Database Operations Skills Summary"
I hope this article is helpful to you in PHP programming.
http://www.bkjia.com/PHPjc/1125898.html www.bkjia.com true http://www.bkjia.com/PHPjc/1125898.html techarticle PHP Simple implementation of the method of bulk upload pictures, the example of this article on PHP simple implementation of the method of bulk upload pictures. Share to everyone for your reference, specifically as follows: Phpfunction upload_ ...