问题
Regardless of the filetype() documentation, PHP 5.4.7 returns "dir" on symlinks on Windows 7.
What's the most reliable way to detect a symlink on Windows 7?
回答1:
what does is_link() return in your case? maybe you can use that to test for links.
The provided link ( http://php.net/manual/en/function.is-link.php ) contains a workaround for Windows in the first comment. It's ugly, but I guess it does the job.
来源:https://stackoverflow.com/questions/13379645/filetype-returns-dir-for-symlinks-on-windows-7