Caching HTML output with PHP

后端 未结 8 1434
时光说笑
时光说笑 2020-12-19 21:03

I would like to create a cache for my php pages on my site. I did find too many solutions but what I want is a script which can generate an HTML page from my database ex:

8条回答
  •  醉梦人生
    2020-12-19 21:14

    In my opinion this is the best solution. I use this for cache JSON file for my Android App. It can be simply use in other PHP files. It's optimize file size from ~1mb to ~163kb (gzip).

    Create cache folder in your directory

    Then Create cache_start.php file and paste this code

    
    

    Create cache_end.php and paste this code

    
    

    Then create for example index.php (file which you want to cache)

    
    

提交回复
热议问题