如何在url中使用符号(@)?

问题描述 投票:0回答:2

例如,我遇到这个网址类型:http://username:[email protected]/protected/files

我在网上搜索了这个,但我找不到我的预期。

url browser uri
2个回答
1
投票

维基百科很好地解释了the syntax of a URI

scheme:[//[user[:password]@]host[:port]][/path][?query][#fragment]


1
投票

您的username:[email protected]/protected/files可能看起来像和URL,但如果不是,因为它不包括访问数据的协议。这是一个uri。

浏览器(我想你指的是Web浏览器)可以使用URL,它是包含协议的URI的子类型。请注意Web浏览器不能使用所有现有协议,只能使用其中一些协议(http,https,ftp,file ...)username不是协议。

© www.soinside.com 2019 - 2024. All rights reserved.