当前位置:网站首页>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"
边栏推荐
- 【 application 】 life many years of operations, what turned scored 12 k + annual bonus salary?
- 每天填坑,精卫填坑第二集,TX1 配置从固态启动,安装Pytorch
- np.isnan ()
- js作用域与闭包
- Chemical reagent Phospholipid-polyethylene glycol-hydroxyl, DSPE-PEG-OH, DSPE-PEG-Hydroxyl, MW: 5000
- 我的小笔记 =》其他东东
- 函数提升和变量提升
- Knowledge Engineering Assignment 2: Introduction to Knowledge Engineering Related Fields
- 客户评分控件
- canvas--饼状图
猜你喜欢

网址URL

Debian 10 NTP 服务配置

知识工程作业2:知识工程相关领域介绍

通过PS 2021 将网页图标抠下来

URL URL

DSPE-PEG-PDP, DSPE-PEG-OPSS, phospholipid-polyethylene glycol-mercaptopyridine supply, MW: 5000

Phospholipid-polyethylene glycol-targeted neovascularization targeting peptide APRPG, DSPE-PEG-APRPG

require modular syntax

Deveco studio Hongmeng app access network detailed process (js)

C语言 十六进制整数字符串转十进制整数
随机推荐
oracle inner join and outer join
meime模块
枚举法方法:(leetcode1300)转变数组后最接近目标值的数组和
广州华为面试总结
配置mmdet来训练Swin-Transformer之一配置环境
Deveco studio 鸿蒙app访问网络详细过程(js)
啃瓜记录又一天
Common methods of js array deduplication
kettle 安装与配置
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Phospholipid-polyethylene glycol-hydrazide, DSPE-PEG-Hydrazide, DSPE-PEG-HZ, MW: 5000
PCL—point cloud data segmentation
微信小程序云开发如何将页面生成为pdf?
暴力方法求解(leetcode14)查找字符串数组中的最大公共前缀
getattr() function analysis
oracle内连接和外连接
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
---静态页面---
DOM操作---放大镜案例
由中序遍历和前序遍历得到后序遍历(树的遍历)