upload_name = $_FILES["file"]["name"]; //取得上传文件名
$this->upload_filetype = $_FILES["file"]["type"];
$this->upload_final_name = date("Y-m-d H:i:s").$this->upload_name;
$this->upload_tmp_name = $_FILES["file"]["tmp_name"];
$this->allow_uploadedfile_type = array("image/gif","image/jpeg");
$this->upload_file_size = $_FILES["file"]["size"];
$this->upload_target_dir="./upload";
}
function upload_file()
{
if(in_array($this->upload_filetype,$this->allow_uploadedfile_type))
{
if($this->upload_file_size < $this->allow_uploaded_maxsize)
{
if(!is_dir($this->upload_target_dir))
{
mkdir($this->upload_target_dir);
}
$this->upload_target_path = $this->upload_target_dir."/".$this->upload_final_name;
if(!move_uploaded_file($this->upload_tmp_name,$this->upload_target_path))
echo "文件上传失败!";
}
else
{
echo("文件太大,上传失败!");
}
}
else
{
echo("不支持此文件类型,请重新选择");
}
}
}
?>
部分功能简介:商品收藏夹功能热门商品最新商品分级价格功能自选风格打印结算页面内部短信箱商品评论增加上一商品,下一商品功能增强商家提示功能友情链接用户在线统计用户来访统计用户来访信息用户积分功能广告设置用户组分类邮件系统后台实现更新用户数据系统图片设置模板管理CSS风格管理申诉内容过滤功能用户注册过滤特征字符IP库管理及来访限制及管理压缩,恢复,备份数据库功能上传文件管理商品类别管理商品添加/修改/
0
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号