聘我网

新概念招聘3.0

路径中“./”是否有必要?

vote up0vote downstar

在phpmyadmin中的代码,看到这样的:

<link rel="icon" href="./favicon.ico" type="image/x-icon" />

它跟:

<link rel="icon" href="favicon.ico" type="image/x-icon" />

有什么不同么?

 

1 个答复

vote up0vote downcheck

一样的,"./"在解析时会去掉(参见RFC 3986 – 5.2.4. Remove Dot Segments

While the input buffer is not empty, loop as follows:

 A.  If the input buffer begins with a prefix of "../" or "./",
     then remove that prefix from the input buffer; otherwise,  …
链接

您的回答





不是您要找的问题? 浏览其他含有标签 的问题或者 自己问个.