为啥不能输出反斜杠

WBOY
Release: 2016-06-13 12:17:50
Original
1192 people have browsed it

为什么不能输出反斜杠?
 define('__DIR__', dirname(__FILE__)."\\");
 echo __DIR__;


------解决思路----------------------
__DIR__ 是魔术常量,能被你定义

__DIR__ 文件所在的目录。如果用在被包括文件中,则返回被包括的文件所在的目录。它等价于 dirname(__FILE__)。除非是根目录,否则目录中名不包括末尾的斜杠。(PHP 5.3.0中新增)

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 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!