PHP 中的 directory separator 是不是真的没必要?
Windows 接受 / 和 \
*unix 下系统接受 /
统一使用 / 是不是就没必要使用 directory separator
参见两篇说不必要的:
http://alanhogan.com/tips/php...
http://us2.php.net/manual/en/...
确认一下,是不是真的没必要?
在以下两种情况下有用:
路径
的话,也要使用DIRECTORY_SEPARATOR
,来保证兼容。@Summer 全部使用/ 的话,从系统中取出路径,win下混用也是兼容的吧?
参考这个 Is using the directory separator constant neccessary?