Folders of the same level, call the pictures inside
Tree menu:
Folder A
deleee.aspx
Folder B
img (folder)
abc (Folder)
abc.jpg (Everyone knows this~~~)
The writing is rubbish~~~~~
I currently have deleee in folder A. The aspx page wants to call the abc.jpg image
in the abc folder in the img folder in folder B. What path should be used? Because it is uploaded to the server. The absolute path will have a drive letter, which is not good. , it may not be found. Of course I haven’t tried it. There are many folders in folder B, each with pictures and CSS, so I don’t consider putting folder B in folder A. This leads to duplication of files, please give me a good answer, thank you~~~~~
Because I can’t post pictures (I can’t do it~~~~) I wrote it by hand and hurt everyone’s eyes~~~I’m sorry everyone~~~~
../B/abc/abc.jpg
Of course, use relative paths:
<img src="../abc/abc.jpg" />
The directory of folder B should be Folder B/img/abc/abc.jpg The system blocked me a lot of spaces~~~
Of course, use relative paths:
HTML code
<img src="../abc/abc.jpg" />
Wrong writing. One layer is missing. .
I have done this relatively, but can you be more specific~
< ;img src="../B/abc/abc.jpg" />
Relative path representation method:
./ represents the current folder
../ represents the parent folder
This problem is because of the specificity of folder B I don’t understand the name, so I pretend that B’s folder name is dynamic. How should I use relative paths?
Is my question a bit 2B~~~~ Hehe, don’t mind~~
My problem is a bit ~~~
If your B directory is also dynamic, the path is stored in the database.
Take it out and use
/ to represent the site root directory
./ Current directory
../ Parent directory
Just remember it and it’s ok