filetype() 在 Windows 7 上返回符号链接的目录 [英] filetype() returns dir for symlinks on Windows 7
本文介绍了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.
这篇关于filetype() 在 Windows 7 上返回符号链接的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文