首页 > 解决方案 > PHP 标题更改,包括标题

问题描述

我在更改页面的每个标题时遇到问题,因为在我的每个页面中都包含索引,我当前的设置是:

在 index.php 中:

<?php

$title = "Your title goes here";

?>

在 custompage.php 中:

<title><?php echo $title; ?></title>

这是我尝试过的并且效果很好,但是 index.php 没有标题,我该如何解决?

标签: phptitle

解决方案


推荐阅读