/* 单个文件上传 功能 上传文件 配置允许的后缀 配置允许的大小 获取文件后缀 判断文件的后缀 报错 */ class UpTool{ protected $allowExt = 'jpg,jpeg,gif,bmp,png'; protected $maxSize = 1; //1M ,以M为单位 protected $file = null; //准备储存上传文件信息 protected $errno = 0; //错误代码 protected $error = array( 0=>'无错'…