Guest User

Untitled

a guest
Jun 24th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. function file_exists(path)
  2. local attr = lighty.stat(path)
  3. if (attr and attr["is_file"]) then
  4. return true
  5. else
  6. return false
  7. end
  8. end
  9.  
  10. if not file_exists(lighty.env['physical.path']) then
  11. lighty.env["uri.path"] = "redmine-fastcgi.sock"
  12. lighty.env["physical.rel-path"] = lighty.env["uri.path"]
  13. lighty.env["physical.doc-root"] = "/tmp/"
  14. lighty.env["physical.path"] = lighty.env["physical.doc-root"] .. lighty.env["physical.rel-path"]
  15. end
Add Comment
Please, Sign In to add comment