<?php
include("objupload.class.php");
if($_FILES["upfile"]["name"]!="")
{
$upfile= new ObjUpload('upfile'); // upfile is form file field name
$upfile->setExtensions('jpeg,jpg,png,gif,flv'); // Permitted file extensions
$upfile->upload('tpl',null,true,200,200,1048576); // upload folder,filename,uniquenamesetting,optional width (For images), Optional height (For Images), maximum filesize
echo $upfile->upResult;
}
?>
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<input name="upfile" type="file" />
<input name="add" type="submit" value="ADD" />
</form>
|