当前位置:网站首页>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"
边栏推荐
- debian 10 nat 与路由转发
- np.unique()函数
- C语言 十六进制整数字符串转十进制整数
- DSPE-PEG-DBCO Phospholipid-Polyethylene Glycol-Dibenzocyclooctyne A Linear Heterobifunctional Pegylation Reagent
- 知识问答与知识会话的区别
- SSM integration
- A senior test engineer asked me these questions as soon as the interview came
- Advanced gradient of skeleton effect, suitable for waiting for pictures
- ssm各类配置模板
- C语言中关于2的n次方求值问题(移位运算)
猜你喜欢
DSPE-PEG-DBCO 磷脂-聚乙二醇-二苯并环辛炔 一种线性杂双官能聚乙二醇化试剂
磷脂-聚乙二醇-醛基 DSPE-PEG-Aldehyde DSPE-PEG-CHO MW:5000
啃瓜记录又一天
我的小笔记 =》其他东东
Deveco studio Hongmeng app access network detailed process (js)
第一篇博客
require modular syntax
[Basic Tutorial of Remote Control Development 1] Crazy Shell Open Source Formation Drone-GPIO (Remote Control Indicator Light Control)
Chapter 10 Clustering
The @autowired distinguished from @ the Resource
随机推荐
oracle内连接和外连接
subprocess.CalledProcessError: Command 'pip install 'thop'' returned non-zero exit status 1.
Deveco studio Hongmeng app access network detailed process (js)
np.unique() function
DSPE-PEG-Silane, DSPE-PEG-SIL, phospholipid-polyethylene glycol-silane modified active group
磷脂-聚乙二醇-靶向新生血管靶向肽APRPG,DSPE-PEG-APRPG
[Learning Records of Boxue Valley] Super summary, share with heart | Software Testing Interface Testing Basics
ThunderBirde无法登录问题、pycharm调试一直收集数据、RuntimeError: CUDA error: device-side assert triggered等疑难杂症解决
语义分割标签即像素值的巨坑,transforms.ToTensor()的错误使用
parser = argparse.ArgumentParser()解析
__dirname
利用 nucleo stm32 f767zi 进行USART+DMA+PWM输入模式 CUBE配置
The @autowired distinguished from @ the Resource
区间问题 : 今年暑假不AC
微信小程序实现文本安全监测
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
C语言 0长度数组/柔性数组
每天填坑,精卫填坑第二集,TX1 配置从固态启动,安装Pytorch
Advanced gradient of skeleton effect, suitable for waiting for pictures
Deveco studio 鸿蒙app访问网络详细过程(js)