im trying to upload PPS files with php with this:
// check file type
if (strstr($upload_type,"pps")) {
$type_ok = true;
} else {
echo "<b>$upload_file</b> <- this type of file is not allowed (only .pps please)<br />";
}
if ($_FILES['userfile']['size'] > $max_size) {
echo "<b>$upload_file</b> <- this file is too large, please reduce the size<br />";
} else {
$size_ok = true;
}
if ($type_ok == true && $size_ok == true) {
if (copy($temp_file, $upload_dir.$rename_file)) {
echo "<b>$upload_file</b> was uploaded successfully<br />";
}
}
the problem is PPS file types show up as application octec/stream or whatever. i could do this:
if (strstr($upload_file_name,".pps")) {
so that it would check in the name if it is a pps...but is that secure? i mean...couldn't someone upload a php file labeld as a pps file?
is there a specific way for uploading files of this type (PPS) ?
thanks for all your help
🙂