加载中...

清除缓存文件


清除缓存文件clear

如果需要清除应用的缓存文件,可以使用下面的命令:

php think clear

不带任何参数调用clear命令的话,会清除runtime目录(包括模板缓存、日志文件及其子目录)下面的所有的文件,但会保留目录。

如果需要清除某个指定目录下面的文件,可以使用:

php think clear --path d:\www\tp5\runtime\log\

V5.1.10+版本开始,还支持直接清除日志(--log)、缓存(--cache)目录,并支持删除空目录选项(--dir

清除日志目录

php think clear --log

清除日志目录并删除空目录

php think clear --log --dir

清除数据缓存目录

php think clear --cache

清除数据缓存目录并删除空目录

php think clear --cache --dir

V5.1.14+版本开始,可以用clear指令清除路由缓存

php think clear --route

还没有评论.