File类 兼容性处理

This commit is contained in:
thinkphp
2016-10-26 20:05:04 +08:00
parent c977af7921
commit 4ca0e81d31

View File

@@ -39,7 +39,7 @@ class File extends SplFileObject
public function __construct($filename, $mode = 'r')
{
parent::__construct($filename, $mode);
$this->filename = $this->getRealPath();
$this->filename = $this->getRealPath() ?: $this->getPathname();
}
/**