How to echo image that is outside of the public folder

前端 未结 3 1659
野性不改
野性不改 2021-01-22 06:21

In this project, I am uploading admin submitted files to a folder which is outside of the public folder.

/web/ (the public folder)
/upload/ (uploading image to t         


        
3条回答
  •  星月不相逢
    2021-01-22 07:17

    I would skip the php and folder options and use symbolic links directly in the server. I assume that you are using some form of linux as your server. So, if it is not a security issue, simply make the upload folder a copy of the public folder that you have the images in. This, will, however, make everything in that folder appear in the upload folder, but this should not be much of an issue, as the alternative would be to alter permissions on the upload folder and script the whole thing out that way.

提交回复
热议问题