PrependandAppendFileswith ?. Htaccess

Source: Internet
Author: User
Oneofthelessorknownandusedcapabilitiesof. htaccessfilesistheabilitytoprependandappend=destoeverypagerequest .? Doingsoavoidsneedingtocode? Phprequire (footer. php );? Ineverytemplatefileyouwattousethem

One of the lessor known and used capabilities of. htaccess files is the ability to prepend and append nodes des to every page request .? Doing so avoids needing to code? Php require ('footer. php ');? In every template file you wat to use them

One of the lessor known and used capabilities of. htaccess files is the ability to prepend and append nodes des to every page request .? Doing so avoids needing to code In every template file you wat to use them in .? Here's the. htaccess code:

# Prepend the filephp_value auto_prepend_file "/dir/path/utilities.php"# Append file to bottom of pagephp_value auto_append_file "/dir/path/templates/footer.php"

Now don't mistake this post as me telling you to use this strategy ;? Using this functionality creates a layer of indirection that cocould confuse a team of developers if they don't all have a grasp of where automatically stored files are coming from .? Just wanted to let you know this was possible!

Read the full article at: Prepend and Append Files with. htaccess

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.