filetype() 在 Windows 7 上返回符号链接的目录
问题描述:
不管 filetype() 文档,PHP 5.4.7在 Windows 7 上的符号链接上返回dir".
Regardless of the filetype() documentation, PHP 5.4.7 returns "dir" on symlinks on Windows 7.
在 Windows 7 上检测符号链接的最可靠方法是什么?
What's the most reliable way to detect a symlink on Windows 7?
答
is_link() 在你的情况下返回?也许你可以用它来测试链接.
what does is_link() return in your case? maybe you can use that to test for links.
提供的链接(http://php.net/manual/en/function.is-link.php ) 在第一条评论中包含 Windows 的解决方法.这很丑陋,但我想它可以胜任.
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.