-3
我有一個下面的代碼,即使我上傳一個有效的擴展名的文件,它會返回false?的Joomla API的爲什麼代碼返回false
$file = JRequest::getVar('filename', null, 'files', 'array');
jimport('joomla.filesystem.file');
if(strtolower(JFile::getExt($file)) == 'pdf' || strtolower(JFile::getExt($file)) == 'gif' || strtolower(JFile::getExt($file)) == 'jpg' || strtolower(JFile::getExt($file)) == 'png') {
// ..
}
else {
// ..
}
U將刪除strlower和嘗試? –