add base_url() function in helpers, works with https and port number
This commit is contained in:
@@ -116,3 +116,12 @@ function paginationLinks($current_page, $total_pages, $base_url) {
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function base_url(){
|
||||
return sprintf(
|
||||
"%s://%s:%s",
|
||||
isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http',
|
||||
$_SERVER['SERVER_NAME'],
|
||||
$_SERVER['SERVER_PORT']
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user