当前位置:网站首页>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"
边栏推荐
- 利用 nucleo stm32 f767zi 进行USART+DMA+PWM输入模式 CUBE配置
- Phospholipid-polyethylene glycol-azide, DSPE-PEG-Azide, DSPE-PEG-N3, MW: 5000
- Error in render: “TypeError: Cannot read properties of null (reading ‘0‘)“ 报错解决方案
- nucleo stm32 h743 FREERTOS CUBE MX配置小记录
- STM32 map文件解析
- Debian 10 NTP 服务配置
- The difference between the knowledge question and answer session with the knowledge
- How to check whether a table is locked in mysql
- debian 10 nat and routing forwarding
- 远程调试、无cuDnn、自定义模块无法导入问题记录
猜你喜欢
随机推荐
display,visibility,opacity
URL URL
我的小笔记 =》原生微信小程序
区间问题 : 今年暑假不AC
Phospholipid-polyethylene glycol-hydrazide, DSPE-PEG-Hydrazide, DSPE-PEG-HZ, MW: 5000
解决MySQL创建子视图并查看的时候,字符集报错问题
DSPE-PEG-DBCO 磷脂-聚乙二醇-二苯并环辛炔 一种线性杂双官能聚乙二醇化试剂
ThunderBirde无法登录问题、pycharm调试一直收集数据、RuntimeError: CUDA error: device-side assert triggered等疑难杂症解决
配置mmdet来训练Swin-Transformer之一配置环境
Phospholipid-polyethylene glycol-thiol, DSPE-PEG-Thiol, DSPE-PEG-SH, MW: 5000
L1-043 阅览室 (20分)
动态代理工具类
C语言 void和void *(无类型指针)
JJWT工具类
Detailed explanation of the usage of exists in mysql
SOCKS5
require模块化语法
Redis simple study notes
How to check whether a table is locked in mysql
querystring模块









