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

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

WBOY
Release: 2016-05-17 08:49:31
Original
1259 people have browsed it

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
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template