//Introduced in the head
use think\Request;
//Insert the following code where you need to get the current domain name:
$rs = Request::instance();
$url= $rs->domain();
var_dump($url);die;//url就是当前的域名啦
//Introduced in the head
use think\Request;
//Insert the following code where you need to get the current domain name:
$rs = Request::instance();
$url= $rs->domain();
var_dump($url);die;//url就是当前的域名啦