Use php's readfile() or redirect to display a image file?

后端 未结 3 1024
孤独总比滥情好
孤独总比滥情好 2021-01-21 16:59

I\'ve a directory outside the webroot with images, css and javascripts.
These files often change.
I could write a script which locates the file, figures out the mime

3条回答
  •  执念已碎
    2021-01-21 17:58

    Another suggestion: if you have control of the filesystem, you could perhaps create a symbolic link in the web-accessable directory to the image file? Either using exec() to invoke the 'ln' command or maybe the PHP symlink() function might work.

提交回复
热议问题