diff --git a/qrcode/helpers/helpers.php b/qrcode/helpers/helpers.php index e232703..82a53a6 100644 --- a/qrcode/helpers/helpers.php +++ b/qrcode/helpers/helpers.php @@ -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'] + ); +}