<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>
<body>
<form action=”file.php” method=”post” enctype=”multipart/form-data”>
<table><tr><td>
<INPUT size=35 name=”fileupload” type=”file” ></input>
<input type=”submit” value=”upload”>
</td></tr></table>
</form>
</body>
</html>
———————————————————————————
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<script language=”JavaScript”>
alert(“hi”);
</script>
</head>
<body>
<?php
echo “welcome”;
$src=$_FILES['fileupload'] ['tmp_name'];
$desc=$_FILES['fileupload'] ['name'];
if(is_uploaded_file($src))
{
echo “<br>This file is uploaded file”;
}
else
{
echo “<br>This file is not uploaded file”;
}
$desc=”./abc.txt”;
echo $desc;
if (move_uploaded_file($src,$desc)){
echo “<br>uploaded”;
}
else
{
echo”<br>Not uploaded”;
}
$filename = $_FILES['fileupload']['name'];
$tmpname = $_FILES['fileupload']['tmp_name'];
$size = $_FILES['fileupload']['size'];
$path = “file/”.$filename;
move_uploaded_file($tmpname,$path);
?>
</body>
</html>