diff --git a/app/Libraries/Helper.php b/app/Libraries/Helper.php index b0d0729..99628c0 100644 --- a/app/Libraries/Helper.php +++ b/app/Libraries/Helper.php @@ -1,4 +1,6 @@ load(); /** * Generate output in JSON format and terminate the script * @@ -62,7 +64,7 @@ function view($fileName,$data = null){ if(! function_exists('route')){ function route($route){ if($route == "") - return header("Location: http://localhost/hris"); + return header("Location: ".getenv('APP_URL')); header("Location: $route"); exit(); } @@ -88,3 +90,7 @@ function notFound(){ header("HTTP/1.1 404 Not Found"); exit("URL not found"); } + + function esc($string){ + return htmlspecialchars($string); + } \ No newline at end of file