Home > Web Front-end > HTML Tutorial > About the text in the middle of src=''_html/css_WEB-ITnose

About the text in the middle of src=''_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:01:57
Original
1186 people have browsed it

What is the difference between entering "filename" and entering "/filename"?

How to enter to select files from the root directory?


Reply to discussion (solution)

1. If there is a virtual web container:/filename, select the file from the root directory.
The web container refers to placing your files under apache, tomcat, and iss.
If not, the "/file name" will not be recognized by html.
2. File name/file.html
This means that the file name and the current file are in the same directory, so access is relative. Does not depend on whether it is in a virtual web container.
Then the solution: If it is in a virtual web container, just "/file name".
If it is not in the container, it only has ../../ file name, which can be obtained by relative path.

1. If there is a virtual web container:/filename, select the file from the root directory.
The web container refers to placing your files under apache, tomcat, and iss.
If not, the "/file name" will not be recognized by html.
2. File name/file.html
This means that the file name and the current file are in the same directory, so access is relative. Does not depend on whether it is in a virtual web container.
Then the solution: If it is in a virtual web container, just "/file name".
If it is not in the container, it only has ../../ file name, which can be obtained by relative path.


Correct the first point. If it is not on the site, then the "/file name" method is to be found from the root directory of the disk, instead of not being recognized.

What is the difference between filename and /filename?
The difference is that the former starts from the current directory (relative path), and the latter starts from the root directory (absolute path)

Those who do web development must face two sets of paths:
1. File system
2. web system

Related labels:
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