I have a question about the image path while creating a web page.

Asked 2 years ago, Updated 2 years ago, 40 views

While creating a web page, I realized that there are absolute and relative paths when setting the image path.

There is a picture called everyow.gif called C:\Document\Homepage\image.

Absolute path img src = "C:\Document\Homepage\image\everywow.gif"

Relative path img src="image/everywow.gif"

One thing to note here is that you use the symbol \ to display the path of a hard disk (local), such as C:\, where you can see the picture on your computer because you used the local path. However, no one else can see it. The reason for this is that you need to access your computer to view the file everywow.html that you have a lot of, but your computer is not a web server.

I just set the web page image in the relative path, but in this case, does the image become invisible when someone else uses the web page I made?

html php mysql

2022-09-21 21:34

1 Answers

The image file created by the questioner must be serviced by the questioner using the web server so that we can see it.

Because the image created by the questioner is on the questioner pc, so I can only see it if I download the image. Wouldn't my PC need the same image to see it?

The relative path is the current open file standard.


2022-09-21 21:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.