当前位置:网站首页>相对路径与绝对路径
相对路径与绝对路径
2022-07-26 17:03:00 【时代&信念】
简介:
绝对路径:目标文件在硬盘上的真实路径(最精确路径)
相对路径:相对于当前文件位置的路径
“./” 代表目前所在的目录。
" . ./" 代表上一层目录。
“/” 代表根目录。
举例子:
1、文件在当前目录(以图像文件为例,当前项目文件为中心)
"./1.jpg" 或 "1.jpg"
2、文件在上层目录
(1)在上层目录下
"../1.jpg"
(2)在上层目录下的一个Image文件夹下
"../Image/1.jpg"
(3)在上上层目录下
"../../1.jpg"
3、文件在下一层目录(Image1文件夹)
"./Image1/1.jpg"
4、根目录表示法,任何页面访问Image下的Image.jpg图片(绝对路径)
"C:/Image/1.jpg"
完结,撒花撒花…
边栏推荐
- 6、 Common commands of ROS (I): rosnode, rostopic, rosmsg
- 5、 Parameter server principle, code implementation
- Tree DP problem
- VS Code 格式化后 自动让函数名后有空格
- 【集训Day2】Sculpture
- 来吧开发者!不只为了 20 万奖金,试试用最好的“积木”来一场头脑风暴吧!
- JS function scope variables declare that the variables that promote the scope chain without VaR are global variables
- 如何组装一个注册中心?
- 3、 Topic communication: create your own information format
- AI zhetianchuan ml unsupervised learning
猜你喜欢

Redisdesktopmanager removes the upgrade prompt

【集训Day1】Spy dispatch

Machine learning by Li Hongyi 2. Regression
2.1.2 synchronization always fails

【集训Day3】Reconstruction of roads
![Leetcode:1206. design jump table [jump table board]](/img/4f/2b6df8e2151b8bce70c8227c69d8bc.png)
Leetcode:1206. design jump table [jump table board]

【欧米读书会】谈谈元宇宙中的创作者经济:无限次元

Performance tuning bugs emerge in endlessly? These three documents can easily handle JVM tuning

带你熟悉云网络的“电话簿”:DNS

就这一次!详细聊聊分布式系统的那些技术方案
随机推荐
数据库使用psql及jdbc进行远程连接,不定时自动断开的解决办法
二层管理型交换机如何设置IP
Spark统一内存划分
2.1.2 synchronization always fails
[Oumi reading club] talk about the creator economy in the meta universe: infinite dimension
Spark data format unsafe row
The chess robot broke the finger of a 7-year-old boy because "the chess player violated safety rules"?
How to set IP for layer 2 management switches
Common super easy to use regular expressions!
236. The nearest common ancestor of a binary tree
【集训Day2】cinema ticket
性能调优bug层出不穷?这3份文档轻松搞定JVM调优
【集训Day3】section
Performance tuning bugs emerge in endlessly? These three documents can easily handle JVM tuning
CCS TM4C123新建工程
重磅!《2022中国开源发展蓝皮书》正式发布
6、 Common commands of ROS (I): rosnode, rostopic, rosmsg
# MySQL 七种连接方式图解
来吧开发者!不只为了 20 万奖金,试试用最好的“积木”来一场头脑风暴吧!...
URL跳转漏洞