dptr1988 Posted June 25, 2006 Share Posted June 25, 2006 How can I insert HTML codes into the begining or end of each document that apache serves that has the mime type of text/html? Kind of like the way free webhosting sites insert advertisements in your page. Quote Link to comment https://forums.phpfreaks.com/topic/12884-how-do-i-automatically-included-a-header/ Share on other sites More sharing options...
steelmanronald06 Posted June 26, 2006 Share Posted June 26, 2006 go into your httpd docs, or apache config, and use auto-prepend or auto-append, top and bottom respectivly. If you don't know these two, or how they work, google them. I kinda remember, but am not for sure. Google should return good results, however. Quote Link to comment https://forums.phpfreaks.com/topic/12884-how-do-i-automatically-included-a-header/#findComment-49522 Share on other sites More sharing options...
dptr1988 Posted June 26, 2006 Author Share Posted June 26, 2006 Thank you. I googled "auto-prepend apache" and found my answer. It is done with PHP directives auto_prepend_file and auto_append_file. Thank you for your help, otherwise I wouldn't have know what to search for. Quote Link to comment https://forums.phpfreaks.com/topic/12884-how-do-i-automatically-included-a-header/#findComment-49677 Share on other sites More sharing options...
apacheguy Posted June 29, 2006 Share Posted June 29, 2006 The other option, what I use, is the .shtml extension. It is server-side html. So you can put a tag on shtml pages that will insert the code that is located in the file you specify in your tag. Quote Link to comment https://forums.phpfreaks.com/topic/12884-how-do-i-automatically-included-a-header/#findComment-50915 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.