php路径中的数字没有解析到?

WBOY
Release: 2016-06-20 12:50:37
Original
911 people have browsed it

$file = "D:\PHP_OBJECT\6\2\param.txt";echo $file;
Copy after login



php路径中的数字没有了?,是apache错了还是php设置错了,怎么测试呢?


回复讨论(解决方案)

$file = 'D:\PHP_OBJECT\6\2\param.txt';echo $file;
Copy after login
Copy after login
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;
Copy after login
Copy after login
D:\PHP_OBJECT\6\2\param.txt
双引号中转义会生效,慎用!

按规矩,无论是双引号还是单引号中,字符 \ 都是应该转义的
$file = 'D:\\PHP_OBJECT\\6\\2\\param.txt';


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