https://static.06ms.com/static/images/index/9.jpg

一个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:
<form action="upphoto.php?action=act" method="post" enctype="multipart/form-data">
图片来源:<input type="file" name="photo">
<input type=&quo