Home  >  Article  >  Backend Development  >  为什么要转义呢解决思路

为什么要转义呢解决思路

WBOY
WBOYOriginal
2016-06-13 12:20:151205browse

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

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