I get the following error:
An input on why?
The Journey of a Thousand Miles Begins with the First Step...
Warning: copy(files/1094160166507_yaxay_468x60_1.gif): failed to open stream: Permission denied in /home/realest1/public_html/upload_7.php on line 12
Could not copy
Code:
<form name="form1" method="post" action="" enctype="multipart/form-data">
<input type="file" name="imagefile">
<input type="submit" name="Submit" value="Submit">
<?
if(isset( $Submit ))
{
//If the Submitbutton was pressed do:
if ($_FILES['imagefile']['type'] == "image/gif")
{
copy ($_FILES['imagefile']['tmp_name'], "files/".$_FILES['imagefile']['name'])
or die ("Could not copy");
echo "";
echo "Name: ".$_FILES['imagefile']['name']."";
echo "Size: ".$_FILES['imagefile']['size']."";
echo "Type: ".$_FILES['imagefile']['type']."";
echo "Copy Done....";
}
else
{
echo "";
echo "Could Not Copy, Wrong Filetype (".$_FILES['imagefile']['name'].")";
}
}
?> </form>
An input on why?
The Journey of a Thousand Miles Begins with the First Step...