Home > Article > Backend Development > Where to modify the title of the php web page
Where to modify the title of the php page
Generally when you write the title of a web page, you will write it directly in the title tag
If it is the php program we downloaded, the title may be in a config.php php file. So how to find and modify it? The method is very simple.
1. Generally, find the following directory in the downloaded PHP program: config, and then look for whether there is a PHP file specifically for writing configuration information. There will be something like in it. $title is a named variable. This is the title of our website.
2. Check the index.php file of the php program and look for the php code in the title tag. The variable it outputs is the title of our website. At this time, you need to search up to see which external file has been introduced by php, click on the imported file, and modify the title variable.
For example
<?php $page_title="A New Title";//网页标题设置为变量 ?>
HTML code
<title><?php echo $page_title;?></title>
For more PHP related knowledge, please visit PHP Chinese website!
The above is the detailed content of Where to modify the title of the php web page. For more information, please follow other related articles on the PHP Chinese website!