+ 2

What's d difference between: "googlefile/info.jpg" and "/googlefile/info.jpg"

Pls this is confusing to me, so explain very simply I don't understand this file paths difference 🙏😅

21st Jan 2021, 6:20 PM
Precious Nwaoha
Precious Nwaoha - avatar
3 ответов
+ 3
difference is same as in a terminal command: whithout leading slash the path is relative to the current path (the html source path), while with leading slash the path is relative to the root path (the html source domain). as result, both form could be resolved as same absolute path, if the html source is located to the server root...
21st Jan 2021, 8:01 PM
visph
visph - avatar
+ 2
Thanks so much 👍👍😁
21st Jan 2021, 8:18 PM
Precious Nwaoha
Precious Nwaoha - avatar
+ 1
When u preceed any path with a slash ur telling i am designing my path from the root and so on otherwise it's a relative path
21st Jan 2021, 9:52 PM
Nassera
Nassera - avatar