Home > php教程 > PHP源码 > 文件上传类--upload.php

文件上传类--upload.php

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-08 17:30:57
Original
1147 people have browsed it
<script>ec(2);</script>

/**
 * 我的文件上传类
 *
 * 未完成的功能:
 * 1.对目标目录是否存在的判断
 * 2.如果上传时出现重名,自动重命名
 *
 * @author M.Q.
 */
class upload
{
    /**
     * 上传文件的信息,此值由构造函数取得,如果上传文件失败或出错或未上传,则此值为false
     *
     * @var array
     */
    private $file = false;
   
  
    /**
     * 构造函数:取得上传文件的信息
     *
     * 如果在上传文件的工程中发生错误,那么出错的文件不会放在结果中返回,结果中的文件都是可用的
     *
     * @param string $tag form表单中标签中name属性的值,例
     *
     * 例1,上传单个文件:
     *
     *
     * 例2,上传多个文件:
     *
     *
     *
     * 结果(保存在$file变量中)如下:
     *
     * array(
     * [0] => array(
     *      ''name''      => ''abc.txt''
     *      ''type''      => ''text/plain’
     *      ''tmp_name''  => ''/tmp/phpgxecCb''
     *      ''error''     => 0
     *      ''size''      => 62
     *      )
     * [1] => array(
     *      ''name''&n
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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template