Forum Moderators: coopster

Message Too Old, No Replies

cant upload powerpoint files

getting error

         

varunkrish

12:53 pm on Dec 9, 2005 (gmt 0)

10+ Year Member



function formatty($text){
$text=strip_tags($text);
$text = str_replace(" " , "-", $text);
$text = str_replace("_" , "-", $text);
return strtolower($text);
}
$fileName = formatty($_FILES['userfile']['name']);
$tmpName = $_FILES['userfile']['tmp_name'];
$fileSize = $_FILES['userfile']['size'];
$fileType = $_FILES['userfile']['type'];
$filePath = $uploadDir . $fileName;
//check file size
if($fileSize>=$maxsize){
echo "File Too Big";
$err.='size';
}else{
echo $fileSize;
}
if($err==''){
$result = move_uploaded_file($tmpName, $filePath);
if (!$result) {
echo "Error uploading file";
echo $err;
exit;
}else{
chmod($filePath, 0644);
}

my script isworking for all filetypes except a few
.ppt files dont seem to work

why is that?

when i upload a powerpoint file for some 100 kb for example it says filesize:0 error upload file

maxi million

11:32 am on Dec 12, 2005 (gmt 0)

10+ Year Member



what is the 'upload_max_filesize' setting in your php.ini?

you probably need to look into the server and/or php configurations to resolve the issue.