我希望用户能够动态更改网站的标题。
我已经尝试了 Stackoverflow 上的所有动态网站标题问题,但没有一个能解决我的问题。
这是我的 HTML
<fieldset>
<legend style='width:500px;'><h3>Website Title</h3></legend>
<label><h4> Change Website Title </h4></label>
<form action='Config.php' method='POST'>
<input type='text' name='websitetitle' placeholder='Website Title'/> <br />
<input type='submit' value='Update' class='btn btn-small btn-primary' name='update'>
</form>
</fieldset>
配置文件
<?php
if(isset($_REQUEST['update'])) {
$title=strip_tags(stripslashes($_REQUEST['websitetitle']));
}
Global.php(标题所在的位置)
<title><?php include 'Config.php'; echo $title; ?> </title>
提前致谢!