📅  最后修改于: 2022-03-11 14:57:46.797000             🧑  作者: Mango
Yes, like this:
This code checks if the cookie with the name “accepted” has already been set, if not, the cookie is set with the value “true” and a lifetime of 24 hours. For more options, see the docs.
You can check if the cookie has been set with
= cookie:get('accepted') ?>
Hope this helps.