Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
ModulesClassesFunctions
 

Function Reference

define_runtime_constants ( )

Description
No description.
 
Parameters
No parameters for this function
 
Code
041  function define_runtime_constants()
042  {
043      define("CURRENT_URL",$_SERVER["SERVER_PORT"]==443 ? SECURE_URL : URL);
044      define("WEBROOT",prepend_slash(parse_url(CURRENT_URL,PHP_URL_PATH)));   
045      define("URL_PATH",prepend_slash(parse_url($_SERVER["REQUEST_URI"],PHP_URL_PATH)));
046      define("HELIX_WEB_PATH",prepend_slash(preg_replace('/^' . str_replace("/","\\/",remove_trailing_slash(WEBROOT)) . '/i','',URL_PATH)));
047      define("WEB_PATH",prepend_slash(preg_replace('/^\/helix/i','',HELIX_WEB_PATH)));
048      define("ADMIN",(bool)preg_match('/^\/helix/i',HELIX_WEB_PATH));
049      define("PAGE_SITE",append_slash(SITES . (ADMIN ? "helix" : SITE_NAME)));
050      define("SAFARI",(bool)preg_match("/safari/i",$_SERVER["HTTP_USER_AGENT"]));
051      define("IE",(bool)preg_match("/msie/i",$_SERVER["HTTP_USER_AGENT"]));
052      define("IE6",(bool)preg_match("/msie 6/i",$_SERVER["HTTP_USER_AGENT"]));
053      define("NOFRAME",array_key_exists("noframe",$_REQUEST));
054      define("NOSTYLE",array_key_exists("nostyle",$_REQUEST));
055      define("NOSCRIPT",array_key_exists("noscript",$_REQUEST));
056      define("NOCODEBEHIND",array_key_exists("nocodebehind",$_REQUEST));
057      define("NOSESSION",array_key_exists("nosession",$_REQUEST));
058      define("AJAX",array_key_exists("ajax",$_REQUEST));
059      define("DISPOSITION",array_key_exists("attachment",$_REQUEST) ? "attachment" : "inline");
060      define("FORMAT",is_null(reqval("format")) ? "markup" : strtolower(reqval("format")));
061     
062  }
Get Helix PHP Framework at SourceForge.net. Fast, secure and Free Open Source software downloads