Home > Backend Development > PHP Tutorial > 很简单的PHP文件下传代码

很简单的PHP文件下传代码

WBOY
Release: 2016-06-13 10:31:17
Original
1177 people have browsed it

很简单的PHP文件上传代码




Excel数据获取演示




    

      
提交表单

      

        

            
            
        

      

    




public function parse()
     {
        /**
         * $_FILES数组说明
         * array(n) {
         *   ["表单文件框名称"] => array(5) {
         *       ["name"]        => 提交文件名称
         *       ["type"]        => 提交文件类型 Excel为"application/vnd.ms-excel"
         *       ["tmp_name"]    => 临时文件名称
         *       ["error"]       => 错误(0成功1文件太大超过upload_max_filesize2文件太大超过MAX_FILE3上传不完整4没有上传文件)
         *       ["size"]        => 文件大小(单位:KB)
         *   }
         * }
         */
         $return=array(0,'');
         /**
          * 判断是否提交
          * is_uploaded_file(文件名称)用于确定指定的文件是否
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