Sun, June 20, 2021
 
https://devcodepro.comdevcodepro
X
Home · Latest · Trends
17

How to get the current url in smarty

How to get the current url in smarty file
{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}
rated 21 times (19) (2)
comments: 1 / hits: 6450  / 5 years ago, sat, sep 10, 16, 03:19:13
More From » PHP
 

Comments

7
php file:
Code:
$link =  "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
$smarty->assign('link',$link);


template file:
Code:
{$link}
[#5] Tuesday, April 25, 2017, 8:59:48
 
info
commented 4 years ago
Only authorized users can post. Please sign in first, or register a free account
 
Share
Posted
Michael
Member since Sep 10, 2016
Total Code Snippets: 5
Total Comments: 0
Location: n/a
Michael snippets
5 years ago, sat, sep 10, 16, 3:07:57
comments: 1 / hits: 5437
PHP
5 years ago, sat, sep 10, 16, 3:13:33
comments: 0 / hits: 2721
PHP
5 years ago, sat, sep 10, 16, 3:16:20
comments: 0 / hits: 2814
PHP
4 years ago, tue, feb 21, 17, 2:06:26
comments: 0 / hits: 2240
PHP