您不必在每个页面上都调用/包含所需的文件,而可以通过.htaccess文件自动将它们自动添加到文件的顶部(文件顶部)或自动添加到文件的底部(文件底部)。
php_value auto_prepend_file "/real/path/to/file/functions.php"
php_value auto_append_file "/real/path/to/file/footer.php"
翻译自: https://css-tricks.com/snippets/htaccess/append-prepend-files/