PHP设置session定期自动清理

配置完成php后,默认php会将session生成到/tmp目录下,导致/tmp目录文件很多,因此需要对session进行定期的清理:

修改php.ini:



定时任务:

备注:因为此配置修改了php.ini因此需要重新启动php进程。文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/code/php-session-clear/ 文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/code/php-session-clear/

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!

On this day in past years
August
23
 
Byrd
  • by Published onAugust 23, 2014
  • 原文链接:https://note.t4x.org/code/php-session-clear/
匿名

Comment

Anonymous

Slide puzzle verification.