$file = "D:\PHP_OBJECT\6\2\param.txt";echo $file;
php路径中的数字没有了?,是apache错了还是php设置错了,怎么测试呢?
回复讨论(解决方案)
$file = 'D:\PHP_OBJECT\6\2\param.txt';echo $file;
D:\PHP_OBJECT\6\2\param.txt
双引号中转义会生效,慎用!
按规矩,无论是双引号还是单引号中,字符 \ 都是应该转义的
$file = 'D:\\PHP_OBJECT\\6\\2\\param.txt';
$file = 'D:\PHP_OBJECT\6\2\param.txt';echo $file;
D:\PHP_OBJECT\6\2\param.txt
双引号中转义会生效,慎用!
按规矩,无论是双引号还是单引号中,字符 \ 都是应该转义的
$file = 'D:\\PHP_OBJECT\\6\\2\\param.txt';
谢谢
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