改进Upload类的getExt方法

This commit is contained in:
ThinkPHP
2013-04-18 12:04:37 +08:00
parent 6d3bbbe36d
commit 897d88f9b0

View File

@@ -491,8 +491,7 @@ class Upload {
* @return boolean
*/
protected function getExt($filename) {
$pathinfo = pathinfo($filename);
return $pathinfo['extension'];
return pathinfo($filename,PATHINFO_EXTENSION);
}
/**