How smarty gets the current url

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

Notes:

Copy the code The code is as follows:

{$smarty.server.SERVER_NAME}// means: server name
{$smarty.server.REQUEST_URI}// means: requested url



For example: http://www.jb51.net/sysaction/getUserInfo.php

Copy the code The code is as follows:

{$smarty.server.SERVER_NAME} //表示:http://www.jb51.net
{$smarty.server.REQUEST_URI}// 表示:/sysaction/getUserInfo.php

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325387117&siteId=291194637
Recommended