Learn file path relative and absolutly

本文主要探讨了文件复制过程中的路径处理方法,包括相对路径与绝对路径的应用,并通过实例演示了如何正确设置文件路径。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

In past years , i often puzzled in the question of path , but now , i will solve it 

the easy question , it still exeit because i havn't do 

as example: just so so 

i show it by html code , use copy file order to solver it 

The first case:

这里写图片描述

 you have copyed file to current list execute order
cp file name newFileName 

The second case:

这里写图片描述

you have copyed test from img to pathDemo , so the current list is img , and ../ is img parent’list pathDemo

Now are you understand ? is it so easy?

Last we use other demo to explain it :

这里写图片描述

result :

这里写图片描述

As you see , the imgPath is correct , the Mallhome.html in base Path =>案例详情界面 so ../ is 小庄界面布局 

if you want to use relative path : you can write mallhome.png directly 
and the absolute path is /home/ly..
the wrong is 小庄界面布局/   it isn't be relative path !

error:
这里写图片描述

right:
这里写图片描述

Created with Raphaël 2.1.0 parent/child list------> child child parent parent ../ filename

../ is filename list ‘parent you should remember filename as filename list where it in

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值