test_cookies.lp 314 B

12345678910111213
  1. <?lua
  2. local cookies = require"cgilua.cookies"
  3. CL_COOKIE = "cgilua_cookie"
  4. local test = cookies.get (CL_COOKIE)
  5. cookies.sethtml (CL_COOKIE, os.date())
  6. ?>
  7. <h1>Testing Cookies library</h1>
  8. <%= CL_COOKIE%> = <%= tostring(test)%><br>
  9. Assigning current date to cookie!<br>
  10. Reload this script to check cookie's value!