Home  >  Article  >  Backend Development  >  使用dirname(FILE) 需要把反斜杠转化为斜杠吗?

使用dirname(FILE) 需要把反斜杠转化为斜杠吗?

WBOY
WBOYOriginal
2016-06-23 13:41:59994browse

define('AAA',str_replace('\\','/',dirname(__FILE__)));include(AAA.'/bbb/c.php');include(dirname(__FILE__).'/bbb/d.php');

效果都是一样的?


回复讨论(解决方案)

不需要!
建议你统一使用 /
对于函数返回的 \ 也不需要管他

效果是一样的。

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