How to show the image stored above Document_Root

I set src attribute for img below but didn't work:

src = "/../files/filenamee"

the image is not displayed.

How to do it right?

0


a source to share


1 answer


You will not be able to link to the images above in DocumentRoot

any way. The urls are interpreted by the web browser, so it just asks /files/filename

. You need to either write a script that reads files from the directory you want and writes them to the user ( bad idea because these scripts almost always open an unintended security hole) or create a symbolic link to the directory from your document root.



+3


a source







All Articles