How to echo image that is outside of the public folder

前端 未结 3 1657
野性不改
野性不改 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 06:58

    direct path won't work because you can't get content from outside of root folder.. you can do it another way, Read image file in php script from server dir path and serve file using header

    script file.php

    
    
    
    
    

提交回复
热议问题