Img reference local path problem

the address in the database is: / D:/java/apache-tomcat-7.0.39/webapps/MeDesignMaster/3mePic/activityMore_20181010141942AG5tC3FA.png

my img is

Why can"t it be displayed? my local picture also exists

Aug.11,2021

D:/java/apache-tomcat-7.0.39/webapps/MeDesignMaster/3mePic/activityMore_20181010141942AG5tC3FA.png this path is a physical path, while your img access to resources requires a relative path to the site, which, of course, cannot be displayed.


the URL , which is a URL. Such as https://img.codeshelper.com/upload/img/2021/08/11/kxcttvqvfuo786.png and so on. .


unless you are using Node, browsers have sandboxie restrictions that prevent you from accessing the local file system (users can open HTML, on the local system or drag files locally to the browser, but access from the web page-that is, inside the browser-will be restricted).


method 1: you can try to put the local images you need in a folder (or database), pack them under the project you created, and then link to the packaged image file under the project.
method 2: in some languages, the src of img can only access certain types of image files. You can first see if the type of local image you have is allowed to be read.
method 3: check that the physical address of your local picture is correct. (or put the picture in a folder such as program/file on the disk where you installed the system, or try it directly under the disk on which you installed the system.)

Menu