上面是 $host.html 我现在想组合 /html/$host.html 我">
输入banner图图片脚本导航/分类

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");