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

后端 未结 3 1034
孤独总比滥情好
孤独总比滥情好 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:39

    How about a symbolic link directly to the file, not the entire directory? You could even make it a 'static' filename, and then let the web server do the modification timestamp check and caching, which would likely be much, much faster.

    Benchmarks though, of course :)

提交回复
热议问题