使用dirname(__FILE__) 需要把反斜杠转化为斜杠吗?
<br />define('AAA',str_replace('\\','/',dirname(__FILE__)));<br />include(AAA.'/bbb/c.php');<br />include(dirname(__FILE__).'/bbb/d.php');<br />
效果都是一样的?
------解决思路----------------------不需要!
建议你统一使用 /
对于函数返回的 \ 也不需要管他
------解决思路----------------------效果是一样的。
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