网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   PHP (https://www.0058.net/forumdisplay.php?f=75)
-   -   smarty获得当前url的方法分享 (https://www.0058.net/showthread.php?t=5327)

Kamron 2015-11-05 07:24 AM

smarty获得当前url的方法分享
 
http://{$smarty.server.SERVER_NAME}/{$smarty.server.REQUEST_URI}


注释:


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



例如:http://www.loupesusa.com/understanding-dental-loupes.html 代码如下:


{$smarty.server.SERVER_NAME} //表示:www.loupesusa.com
{$smarty.server.REQUEST_URI}// 表示:understanding-dental-loupes.html


All times are GMT +8. The time now is 01:19 AM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.