Hey guys, i'm running a linux server with PHP4 and i'm trying to get this script to work?
The error message that comes up is, i know this obviously means that the IF function shouldn't be there but how else do i fix the file size?
"Parse error: parse error, unexpected T_IF in /home/fhlinux197/h/halofactor.co.uk/user/htdocs/upload.php on line 14"
Here's the script.
<?php
function uploadFile()
{
// File types
if(!stristr($filename, '.wmv'))
{
die("Please make sure that your file type in .wmv .mpg .mov or .avi.");
}
// Overwriting
while(file_exists($filename))
$filename="1".$filename;
// File Size
$oneMb=(1024*1024)*15
if($_FILES>$oneMb)
die("Please make sure your file is smaller than 15MB.");
$uploadDirectory = "http://www.halofactor.co.uk/user/";
copy($_FILES['file']['tmp_name'], $uploadDirectory.$filename)
or
die("There is a problem with our upload, please email me using the email on our contact page.");
}
?>