Hi all
just a quick one here
i am working on a site that has a function to upload files
here's the top of it
function upload_file($File,$Title,$Name,$File_size)
{
//ok, do the upload
$File_name = strtr("$File_name"," ","");
if (strlen($File_name) > 29)
{
$Page_Body .= <<<EOD
<font color="red"><h3>Sorry, but the filename is to big! It has to be less than 30 characters.</h3<$
EOD;
}
else
{
$File_name = preg_replace("/[\t\n ]/", "", $File_name);
$Filename = "$G_Downloads_PHP_Dir/$File_name";
if (file_exists($Filename))
{
$Page_Body .= <<<EOD
<font color="red"><h3>Sorry, but a file with the filename "$File_name" already exists!</h3</font$
EOD;
}
else
{
if (move_uploaded_file($File, "$Filename"))
{
system("chmod a+r $Filename");
My question is what parameters do i need to pass to the function ?
I've tried passing the name of the file (not the temporary name),file_title and actual name of the file. So far no luck
Anyone got any advice - and yes i have read the info on it on this site and others but still no luck
Cheers
GM