开发者

dynamic page title not displaying correctly

开发者 https://www.devze.com 2023-02-22 05:00 出处:网络
I am trying to dynamically change my page titles. I have the following script inside my header.php page

I am trying to dynamically change my page titles. I have the following script inside my header.php page

<?php $pagetitle = "Website Home"; ?>
<head>  
<title><?php echo $pagetitle ?></title>  
</head>

But instead of my page title displaying as "Website Home", the page title shows up as "<?php echo $pagetitle ?>". Is there a reason why the php will not execute inside the <title>开发者_如何学编程; tags?


you're calling your header.php some unusual way. Just include it in other php script.

0

精彩评论

暂无评论...
验证码 换一张
取 消