Hi,
I am having trouble trying to get a simple file upload script to work.
http://largebuttons.com/fileupload/demo.html
Demo.html
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>FILE Upload Demo page</p>
<form name="form1" method="post" action="upload.php" enctype="multipart/form-data">
<p>File to be uploaded.
<input type="file" name="file">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
<p> </p>
</body>
</html>
upload.php
<?php
//Fioe Upload script
$path = "/home/largep/largebuttons-www/fileupload"; //Set this to the full path from ther servers home directory to where the file should be.
//Do not leave a trailing slash.
if($file){
print("File name: $file_name<P>/n");
print("File size: $file_size bytes<P>/n");
if(copy($file, "$path/$file"){
print("Your File was uploaded successfully");
}else{
print("ERROR, your file was not successfully uploaded");
}
unlink($file);
}
?>[/SIZE]
so when i upload a file, i get a parse error.
Parse error: parse error in /home/largep/largebuttons-www/fileupload/upload.php on line 14
Anyone have any ideas? I set the upload directory to /home/largep/largebuttons-www/fileupload and have chmod the directory to 0777
Thanks,
Chuck