Location: PHPKode > scripts > Image Uploader and Resizer > image-uploader-and-resizer/imageUploader_example.php
<?php
/* Example for Image Uploader class */
if ($_FILES && !$_FILES['image']['error']) {
	require_once('./ImageUploader.php');
	$opts = (array)array();
	$opts['dir'] = 'styleimgs/';
	$opts['src'] = $_FILES['image']['tmp_name'];
	$opts['dest'] = $_FILES['image']['name'];
	if (($iu = new ImageUploader($opts)) === false) {unset($opts);}
} else {
	echo '<form method="POST" enctype="multipart/form-data">';
	echo '<input type="file" value="Choose a file..." />';
	echo '<input type="submit" value="Submit" />';
	echo '</form>';
}
Return current item: Image Uploader and Resizer