PHP append and prepend in htaccess

This avoids us to start every PHP with require ‘header.php’; or ending it with require ‘footer.php’; .

# Prepend the file
php_value auto_prepend_file "/real/path/to/file/header.php"
# Append file to bottom of page
php_value auto_append_file "/real/path/to/file/footer.php"
 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.