我有此功能检查,如果该文件是一个图像或不是,但它始终返回false无法检查该文件的类型被上传
function upload_file($file) {
if($file['type'] != "image/jpeg" || $file['type'] != "image/gif") {
$errors[] = "Please upload a photograph with extenstion of JPEG, JPG, GIF or BMP.";
return false;
}
}
所以谁能告诉我在哪里出了错这里!
在此先感谢。
非常感谢你真的保存了一天 – 2012-04-21 00:09:57