[php]
define('DEDEADMIN', preg_replace("/[\\/]{1,}/", '/', 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