开发者

Root Directory?

开发者 https://www.devze.com 2023-02-17 05:06 出处:网络
I\'m editing a file in a folder in my root directory.. here\'s a quick tree: root - images - m - - index.php

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 havin开发者_Go百科g to use my website URL.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消