首页 > 编程语言 >ThinkPHP获取当前url

ThinkPHP获取当前url

时间:2023-02-27 09:57:10浏览次数:30  
标签:HTTP https PROTO url SERVER 获取 && ThinkPHP HTTPS

$httpType = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://';
$selfurl = $httpType . \I('SERVER.HTTP_HOST') . \I('server.REQUEST_URI');

标签:HTTP,https,PROTO,url,SERVER,获取,&&,ThinkPHP,HTTPS
From: https://www.cnblogs.com/sunr/p/17158643.html

相关文章