|
|
Managing Title Tag with PHP - PHP
|
Views : 342
|
|
Tagged in : PHP
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
You can use php define function to define a title tag and defined() is used to check whether a given named constant exists.
//require the header file
require('require/header.php');
//rest of code here
//require the footer
require('require/footer.php'); ?>
then you replace the title tags in require/header.php with:
<title><?php if (defined ('TITLE')) {
print TITLE;
} else {
print 'Site Title Not Set.';
}
?></title>
|
|
By Rekha, On - 2009-11-20 |
|
|
|