为什么要转义呢解决思路

WBOY
Release: 2016-06-13 12:20:15
Original
1253 people have browsed it

为什么要转义呢
str_replace(''\\,'/',dirname(__FILE__)));
上面中红色部分是转义斜杠,为啥要转呢
------解决思路----------------------
因为\是特殊字符。
------解决思路----------------------
只是为了让它变成一个普通字符,让他失去语言意义

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