Upload pictures without refreshing

WBOY
Release: 2016-07-25 08:44:02
Original
969 people have browsed it
php no refresh accept files
                 
On Fulload_pic ($ PATH) {
$ FILENAME = 'Userfile';
$ pic_path = ''; size = $_FILES [$ filename]['size'];
    if ($picname != "") {
  1.             $type = strstr($picname,'.'); .gif'&&$type!='.png')
  2.                                                                                                 => 'Format error, please upload jpg, gif, png',
  3.                                                              ,
  4.                                                              'pic_path' => ''
  5.                                                                                               $pics = md5(uniqid()).$type;
  6. $path = $this->create_dir($path);
  7.                                 $pic_path                                                                                                                                                                                              '], $pic_path);
  8. } }
  9.                                                                                                                          = round($picsize/1024,2);
  10.       $ arr = array(
  11.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         . son_encode( $arr);
  12.            }
  13. Copy code
  14. Upload pictures
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template