The root directory?

I am editing a file in a folder in my root directory .. here is a quick tree:

root
- images
- m
- - index.php

If I want to grab a folder with images from index.php, how would I do it? I tried:

../images

I want to exclude the use of my website url.

0
source share
1 answer

you should use /imagesinstead ../imagesif you know that the image directory is at the root. this will result in resolving directories with image names in the root directory from any path.

For example, if you are on a page /pages/html/MyPage.html, the path /imageswill still be allowed for the catalog of images in the root, while it ../imageswill be resolved to /pages/images.

+6
source

All Articles