The content of the head tag is shared (external file is included)

The method of taking the external file by using PHP and SSI in body tag
is generally used well on the
homepage by the technique often used. After coming to have taken the file by
using PHP or SSI for the menu and the affiliate, it became very easy to manage
the file. On the other hand, the example of taking the external file too much is
not seen in the head tag. Is this because description, keywords in the meta tag,
and the content of the title tag are different according to the page?

..

I took the common external file by using PHP in the head tag even if description,
keywords in the meta tag, and the content of the title tag were different
according to the page, made the content of the head tag another file, and
shared. Next, it explains the method.

The character string is defined from the head tag by previous.

Description, keywords in the meta tag, and the content of the title tag are
registered in the character string just before the head tag as follows.

The registered character string is used in the head tag made a external
file.

The registered character string is displayed in the place of the character
string for which it wants to use in the head tag made a external file as follows.
It displays in addition and it doesn't care in any way to use it in the body tag
even if it uses it. The page can be found by using title ($title) in the H1 tag
as well as the title.

<?php echo $des_c; ?>
<?php echo $key_w; ?>
<?php echo $title; ?>

Example of content of head tag (common external file)

The example of the content of the head tag made a external file is as follows.
The character string registered in this file is progressed. It is an example for
me.

Although "$title" certainly exists, since there may be no contents, "$des_c"
and "$key_w" make a condition judgment so that the meta-tag itself may not be
generated in this case.

How to include the external file in the head tag using PHP page

After all, the method of taking the registration of the character string and
the external file in the head tag (include) does as follows on the PHP page. The
file name in which the content of the head tag is described as an example It is
assumed "head1.inc". Because it is a file that include is done, inc might be
better though any extension is not cared.

Thus, the code became very easy. As for that describes the content
of the head tag, because a lot of kinds are unnecessary, it becomes easy to
manage this file. A selfish change by the homepage builder and writing mistake disappears.

A style sheet is read with a relative address in this way. This is for
validating a style sheet with the software of a homepage builder, Expression
Web3, etc. Scripts, such as Javascript, are read after the style sheet.

Disadvantage that makes content of head tag external file

It is not only good when the content of the head tag is made a external file.
It might be bad as follows. Therefore, I am using this method only to display
the log file in the past of the repair technology information bulletin board
operated only by the editor.

Trouble that makes the title tag without permission occurs because it
doesn't see the title tag from the homepage builder.

The error goes out the grammar to check like HTML Project2 of the editor
fully. There is not a problem if the homepage is purely made only from the
editor either.

Author:
Dai IshikawaI am a Business owner of as76.net, and a Engineer.