Home >Web Front-end >HTML Tutorial >File directory problem, I'm a newbie, please don't blame me~_html/css_WEB-ITnose

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

WBOY
WBOYOriginal
2016-06-24 12:10:471039browse

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" />

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
8876d06a7f8d2ca7f0b38c2cbff66a9c

Wrong writing. One layer is missing. . bd5dbe7f3a35c15426197d332104b724

I have done this relatively, but can you be more specific~

< ;img src="../B/abc/abc.jpg" />

928fc9e4c9bfb2c5df54d0ff9f8b373c



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

Statement:
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