Home > php教程 > php手册 > body text

解析PHP中DIRECTORY_SEPARATOR,PATH_SEPARATOR两个常量的作用

WBOY
Release: 2016-06-13 11:46:41
Original
777 people have browsed it

一个是:DIRECTORY_SEPARATOR
DIRECTORY_SEPARATOR:路径分隔符,linux上就是‘/'    windows上是‘\'

一个是:PATH_SEPARATOR
PATH_SEPARATOR:include多个路径使用,在windows下,当你要include多个路径的话,你要用”;”隔开,但在linux下就使用”:”隔开的。
这2个常量的使用能够避免不同平台的兼容性问题

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!