You are here: Re: [SMARTY] way to get current URL « Smarty Templates Posts « IT news, forums, messages
Re: [SMARTY] way to get current URL

Posted by Monte Ohrt on 09/29/58 11:04

You could assign it how you like:

$smarty->assign('url', 'http://' . $_SERVER['SERVER_NAME'] .
$_SERVER['REQUEST_URI']);

or access server vars directly:

{$smarty.server.REQUEST_URI}

generic@SAFe-mail.net wrote:

>Hello--I would like to be able to get the current URL from within a Smarty template. I have looked at the reserved variables, but the {$smarty.get.page} and {$smarty.post.page} aren't what I need since a form has not been posted, only a php page executed.
>
>Any help will be greatly appreciated.
>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация