Home  >  Article  >  Backend Development  >  smarty获得当前url的方法分享_php实例

smarty获得当前url的方法分享_php实例

WBOY
WBOYOriginal
2016-05-17 08:49:311218browse

http://{$smarty.server.SERVER_NAME}/{$smarty.server.REQUEST_URI}

注释:

复制代码 代码如下:

{$smarty.server.SERVER_NAME}//表示:服务器名称
{$smarty.server.REQUEST_URI}// 表示:请求的url


例如:http://www.jb51.net/sysaction/getUserInfo.php
复制代码 代码如下:

{$smarty.server.SERVER_NAME} //表示:http://www.jb51.net
{$smarty.server.REQUEST_URI}// 表示:/sysaction/getUserInfo.php
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn