Caching generated images with PHP -
I am trying to cache the images that have been generated. Can you create an image by accessing the file by resize.php? Width = x & amp; Height = y If the image of that width and height does not exist, then I am using the image path to make it. However, if it is in existence, then it is served to the visitor.
! The file_exists ($ name) check works fine, then it is not processed if it is not needed.
If (! File_exists ($ name))
Is my reading wrong or false? // image processing here header} ("content-type: image / PNG"); Header ("expiration: Saturn, 25 July 2020 10:00:00 GMT"); Readfile ($ name);
Thanks.
If I had to do this, then if I do not present the image, then processing the image The saved folder must be saved if the file exists, then redirect it to the header ('location:')
Comments
Post a Comment