时间:2021-07-01 10:21:17 帮助过:47人阅读
本文实例为大家分享php图片上传类,供大家参考,具体内容如下
调用方法:
<?php header("Content-Type:text/html; charset=utf-8"); //类的实例化: include("uppoo.php");//类的文件名是upoop.php $up=newupphoto; $submit=$_POST['submit']; if($submit=="上传"){ $up->get_ph_tmpname($_FILES['photo']['tmp_name']); $up->get_ph_type($_FILES['photo']['type']); $up->get_ph_size($_FILES['photo']['size']); $up->get_ph_name($_FILES['photo']['name']); $up->save(); } ?> //上传图片的HTML: