-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和尝试? –