Тарикатлък с PHP за правене на дизайн

В повечето сайтове хедара и футера са еднакви. Моето предложение е да ги разделим в два файла. И още по-лесно да ги инжектираме във всеки пхп файл, който се изпълнява:

php_value auto_append_file none
php_value auto_prepend_file none

Много прост синтаксис, ето пример:
prepend.php:

echo “

this is the prepended file

“;

main.php:

echo “

this is the main file

“;

append.php:

echo “

this is the appended file

“;

в .htaccess”

php_value auto_prepend_file prepend.php
php_value auto_prepend_file append.php

Резултата:

this is the prepended file

this is the main file

this is the appended file