当前位置:网站首页>Relative and absolute paths
Relative and absolute paths
2022-08-02 03:39:00 【cjx177187】
本地相对路径:[file://c:/]
Open the page locally,Write the path in this page:./src/18.jpg src/18.jpg The file of the path is opened locally
本地绝对路径:[file:C:/]
Write the path from the root disk
相对网络路径:当前网页的网址
"./src/18.jpg" ==> "协议://ip:port /src/news/src/18.jpg"
"src/18.jpg" ==> "协议://ip:port /src/news/src/18.jpg"
举例1:
用户输入网址:
"http://192.168.6.60:8080/user/20220728/newspage.html?n=20"
打开了一个页面,在这个页面中有一个img的src是 : "./src/18.jpg"
请问192.168.6.60:8080这个服务器会受到req.url是什么?
答: "/user/20220728/src/18.jpg"
举例2:
用户输入网址:
"http://192.168.6.60:8080/user/20220728/newspage"
打开了一个页面,在这个页面中有一个img的src是 : "./src/18.jpg"
请问192.168.6.60:8080这个服务器会受到req.url是什么?
答: "/user/20220728/src/18.jpg"
它真正的网址:"http://192.168.6.60:8080/user/20220728/src/18.jpg"
绝对网络路径:[协议://ip:port pathname querystring hash]
举例:
用户输入网址: http://192.168.6.60:8080/user/20220728/newspage
打开了一个页面,在这个页面中有一个img的src是 : "192.168.6.60:8080/src/18.jpg"
请问192.168.6.60:8080这个服务器会受到req.url是什么?
答: "/user/20220728/192.168.6.60:8080/src/18.jpg"
它真正的网址:"http://192.168.6.60:8080/user/20220728/192.168.6.60:8080/src/18.jpg"
本地相对根路径:
举例:
用户本地打开: "file:///c:/xx/xx2/index.html"
页面中有一个img的src是 : "/src/18.jpg"
它真正的路径:"file:///c:/src/18.jpg"
Local absolute root path:
举例:
用户输入网址: http://192.168.6.60:8080/user/20220728/newspage
打开了一个页面,在这个页面中有一个img的src是 : "/src/18.jpg"
请问192.168.6.60:8080这个服务器会受到req.url是什么?
答:"/src/18.jpg"
它真正的网址:"http://192.168.6.60:8080/src/18.jpg"
边栏推荐
猜你喜欢

ModuleNotFoundError No module named 'xxx' possible solutions

canvas--pie chart

磷脂-聚乙二醇-叠氮,DSPE-PEG-Azide,DSPE-PEG-N3,MW:5000

利用 nucleo stm32 f767zi 进行USART+DMA+PWM输入模式 CUBE配置

String comparison size in MySQL (date string comparison problem)

AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘

云服务器安装部署Nacos2.0.4版本

Usage of JOIN in MySQL

磷脂-聚乙二醇-靶向新生血管靶向肽APRPG,DSPE-PEG-APRPG

【我的创作纪念日】 3周年
随机推荐
AttributeError: Can't get attribute 'SPPF' on
STM32 CAN过滤器
一个结构体 = 另一个结构体(同类型结构体之间可直接赋值操作)
debian 10 nat and routing forwarding
js基础知识
How to check whether a table is locked in mysql
磷脂-聚乙二醇-酰肼,DSPE-PEG-Hydrazide,DSPE-PEG-HZ,MW:5000
js 取字符串中某位置某特征的值,如华为(Huawei)=>华为
np.isnan ()
Cloud server installation and deployment of Nacos 2.0.4 version
磷脂-聚乙二醇-靶向新生血管靶向肽APRPG,DSPE-PEG-APRPG
微信小程序实现文本安全监测
Amazon sellers how to improve the conversion
FreeRTOS内核详解(1) —— 临界段保护原理
JJWT tool class
通过PS 2021 将网页图标抠下来
parser = argparse.ArgumentParser() parsing
L1-039 古风排版(C)
知识工程作业2:知识工程相关领域介绍
[Mianjing] Mihayou data development on one side and two sides