上面是$host.htm"/>
PHP头条
热点:

php代码字符串跟变量组合规范,帮小弟我看看


php代码字符串跟变量组合规范,帮我看看

$host = $_SERVER["HTTP_HOST"];   //获取主机头
include(str_replace('.yiqimai.baidu.com', '', $host ).".html");
?>

上面是 $host.html
我现在想组合  /html/$host.html
我写的不规范,正确应该怎么写?

------解决方案--------------------
include("/html/".str_replace('.yiqimai.baidu.com', '', $host ).".html");

www.phpzy.comtrue/phprm/33608.htmlTechArticlephp代码字符串跟变量组合规范,帮小弟我看看 php代码字符串跟变量组合规范,帮我看看 $host=$_SERVER["HTTP_HOST"];//获取主机头 include(str_replace('.yiqimai.baidu.com','',$host).".html"); ?> 上面是$host.htm...

相关文章

PHP之友评论

今天推荐