Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何max-age从 PHP 中的缓存标头中删除参数?
max-age
如果我注释掉 中的session.cache_expire变量PHP.ini,它只会将 max-age 设置为 10800。
session.cache_expire
PHP.ini
session_cache_expire(0);
或者如果要删除缓存,请使用:
<?php header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past ?>