File directory problem, I'm a newbie, please don't blame me~_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:10:47
Original
1017 people have browsed it

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~~~~~


Reply to the discussion (solution)

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" />
Copy after login

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

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template