What does this code mean? & Lt ;? Php $ host & nbsp; = & nbsp; $ _ SERVER ['http _ host']; $ HOST & nbsp; = & nbsp; substr ($ host, & nbsp; 0, & nbsp; strpos ($ host, & nbsp ;'. 12. what does this code mean?
$ Host = $ _ SERVER ['http _ host'];
$ Host = substr ($ host, 0, strpos ($ host, '.123.baidu.com '));
If (! Empty ($ host ))
{
Include ('task. php ');
}
Else
{
Include ('click. php ');
}
What does this code mean? Not understanding too much
Get host header
In the second sentence, delete ".123.baidu.com" or do you get anything?
The following if does not understand, if (! Empty ($ host) if the host is empty? Execute task. php or click. php.
Is that true?
------ Solution --------------------
In the second sentence, delete ".123.baidu.com" or do you get anything?
---- Yes, you know echo $ host;
The if below is very simple. In fact, it is to determine whether it is a third-level domain name.