为什么会有PATH_SEPARATOR常量? [英] Why is there a PATH_SEPARATOR constant?

查看:79
本文介绍了为什么会有PATH_SEPARATOR常量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这不是/吗?

为什么要有一个常数?不是像它可以改变,对吗?

Why is there a constant for it? It's not like it can change, right?

推荐答案

PATH_SEPARATOR是用于分隔唯一字符串中许多路径的字符(例如php.ini中的include_path).

PATH_SEPARATOR is the character used to separate many paths in a unique string (like include_path in php.ini).

在UNIX系统上,其值为':',在Windows系统上,其值为';'.

Its value is ':' on a UNIX system and ';' on a Windows system.

您所说的(在UNIX上是'/'在Windows上是'\').

What you're talking about ('/' on UNIX and '\' on Windows) is the DIRECTORY_SEPARATOR constant.

这篇关于为什么会有PATH_SEPARATOR常量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆