如何根据您的页面更改网页标题? [英] How to change webpage title depending what page you on?
本文介绍了如何根据您的页面更改网页标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好如何在我的模板中将< title>< / title>
更改为下面的页面我的模板
< !DOCTYPE html >
< html lang = zh > ;
< head >
< meta http-equiv = Conte nt-Type content = text / html; charset = UTF-8 >
< meta charset = utf-8 >
< title > title - mPanel < / title >
和
如果我点击另一个页面使用相同的模板,标题必须改变。
解决方案
使用任何解决方案来自此处 [ ^ ]。
[OP通过研究上面发布的链接找到答案]
page.php
ob_start();
include(' Templates / Login / _header.php');
缓冲液= ob_get_contents();
ob_end_clean();
buffer = str_replace( %TITLE %, 登录,
Hi how do i change <title></title>
in my template to what page im on below is my template
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title> title - mPanel</title>
And
if i click another page using same template the title must change.
解决方案
Use any solution from here[^].
[Answer found by OP by researching the links I posted above]
page.php
ob_start(); include('Templates/Login/_header.php');
buffer=ob_get_contents(); ob_end_clean();
buffer=str_replace("%TITLE%","Login",
这篇关于如何根据您的页面更改网页标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文