Reputation: 2163
I'm editing a file in a folder in my root directory.. here's a quick tree:
root
- images
- m
- - index.php
If I want to grab the images folder from index.php, how would I go about doing that? I've tried:
../images
I want to eliminate having to use my website URL.
Upvotes: 0
Views: 2462
Reputation: 36640
you should use /images
instead of ../images
if you know the image directory is in the root. this will resolve to a directory named images in the root from any path.
eg if you are on page /pages/html/MyPage.html
the path /images
will still resolve to the images directory in root whereas ../images
would resolve to /pages/images
.
Upvotes: 6