Home >php教程 >php手册 >PHP的DIRECTORY_SEPARATOR,PATH_SEPARATOR

PHP的DIRECTORY_SEPARATOR,PATH_SEPARATOR

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:15:38788browse

PHP的DIRECTORY_SEPARATOR,PATH_SEPARATOR 有需要的朋友可参考。

DIRECTORY_SEPARATOR:路径分隔符,linux上就是‘/’    windows上是‘’

一个是:PATH_SEPARATOR

PATH_SEPARATOR:include多个路径使用,在windows下,当你要include多个路径的话,你要用”;”隔开,但在linux下就使用”:”隔开的。

这2个常量的使用能够避免不同平台的兼容性问题

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn