View Full Version : php include in a template file
09-17-2005, 01:26 PM
I want to insert a php include inside my template file, however, like most servers, my server will not employ that function since it could only work with the files with a .php extention.
Is there a way around this?
If not, what can be an alternative to insert an include function in a template?
09-17-2005, 03:40 PM
You could use .htaccess to make it so that files with that extension is treated like a php file.
AddHandler application/x-httpd-php .ext
Just change .ext to the extension.
09-17-2005, 05:57 PM
You should first check that your server dont mind you doing this.. While they *shouldnt* have any problem with it, I have heard of accounts being de-activated due to people setting up things in .htaccess that the server didnt want to allow (SSI for example). Besides, it cant hurt asking and if theyre anything of a decent host they will say yes :)
09-18-2005, 08:28 AM
You could change the extension of the template file to .php
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.