Tue, January 26, 2021
 
https://devcodepro.comdevcodepro
Home · Latest · Trends  /  PHP
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: 5898  / 4 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
4 years ago, sat, sep 10, 16, 3:07:57
comments: 1 / hits: 4707
PHP
4 years ago, sat, sep 10, 16, 3:13:33
comments: 0 / hits: 2410
PHP
4 years ago, sat, sep 10, 16, 3:16:20
comments: 0 / hits: 2583
PHP
4 years ago, tue, feb 21, 17, 2:06:26
comments: 0 / hits: 2061
PHP