最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
文件上传类
时间:2022-07-02 10:09:22 编辑:袖梨 来源:一聚教程网
使用示例:
upload.php
include_once "upload.class.php";
if ($Submit != '')
{
$fileArr['file'] = $file;
$fileArr['name'] = $file_name;
$fileArr['size'] = $file_size;
$fileArr['type'] = $file_type;
/** 所允许上传的文件类型 */
$filetypes = array('gif','jpg','jpge','png');
/** 文件上传目录 */
$savepath = "/usr/htdocs/upload/";
/** 没有最大限制 0 无限制*/
$maxsize = 0;
/** 覆盖 0 不允许 1 允许 */
$overwrite = 0;
$upload = new upload($fileArr, $file_name, $savepath, $filetypes, $overwrite, $maxsize);
if (!$upload->run())
{
echo "上传失败".$upload->errmsg();
}
}
?>
文件上传
上传类
upload.class.php
//
// +----------------------------------------------------------------------+
// | 文件上传 |
upload.php
include_once "upload.class.php";
if ($Submit != '')
{
$fileArr['file'] = $file;
$fileArr['name'] = $file_name;
$fileArr['size'] = $file_size;
$fileArr['type'] = $file_type;
/** 所允许上传的文件类型 */
$filetypes = array('gif','jpg','jpge','png');
/** 文件上传目录 */
$savepath = "/usr/htdocs/upload/";
/** 没有最大限制 0 无限制*/
$maxsize = 0;
/** 覆盖 0 不允许 1 允许 */
$overwrite = 0;
$upload = new upload($fileArr, $file_name, $savepath, $filetypes, $overwrite, $maxsize);
if (!$upload->run())
{
echo "上传失败".$upload->errmsg();
}
}
?>
上传类
upload.class.php
//
// +----------------------------------------------------------------------+
// | 文件上传 |
相关文章
- ps怎么做光圈的光晕效果?ps照片添加唯美光晕的技巧 07-01
- 苏丹的游戏谋反线详细攻略 07-01
- 苏丹的游戏欢愉之馆全收集方式 07-01
- Hyperliquid 价格能否在 2025 年第三季度创新高 07-01
- 标普500指数上链!Centrifuge 和 S&P DJI 共同宣布「24/7交易」来了 07-01
- 金铲铲之战s14超频源计划纳亚菲利阵容攻略 07-01