<?php
if (isset ($_POST["submit"])) {
include ("imageresizer.class.php");
$image = new Image($_FILES['file']['name']);
$image -> PicDir = "uploads/";
$image -> TmpName = $_FILES['file']['tmp_name'];
$image -> FileSize = $_FILES['file']['size'];
$image -> FileType = $_FILES['file']['type'];
//$image -> Save(); //use this if you wish images without resizing
$image -> Resize ();
} else {
?>
<form name="form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method=post enctype="multipart/form-data">
<input type="file" name="file" size="40">
<input type="submit" name="submit" value="submit">
</form>
<?php
}
?>
|