header.phpとfooter.phpファイルがあります。私の HTML ヘッダーはheader.php にあり、index.phpファイルがあります。
私はそう使用しています(index.php):
require 'header.php';
$example_code = 'example';
︙
require 'footer.php';
そして私のheader.php:
<html>
<head>
<title>
???
<title>
<meta name="description" content="???" />
<meta name="keywords" content="???" />
</head>
<body>
︙
index.phpからheader.phpにデータを送信して、そこで印刷したいと考えています (「参考文献」を参照???
)。関数を考えていheader()
ますが、PHP のマニュアルに例がありません。