Translate

<?php
echo '<form action="#" enctype="multipart/form-data" method="post">
<input type="file" name="myfile" />
<input type="submit" value="ok" />
</form> ';
$i = $_FILES['myfile']['name'];
$tmp = $_FILES["myfile"]["tmp_name"];
move_uploaded_file($tmp,"images/".$i);
echo "<img src= 'images/$i' width='300px' height='300px'>";
?>

No comments:

Post a Comment