Page 1 of 1
Use php includes?
Posted: Tue Mar 16, 2010 8:32 pm
by dmpp
I have many applications that run on my site and they all work with being able to pull in php include files, so that when I want to make a change to the navigation, footer, design, etc, I can change the include file, and it filters down through the entire site and all applications.
I have been unable to pull my php includes in to phpMyFAQ.
Has anyone been able to do this? If so, how?
Re: Use php includes?
Posted: Tue Mar 16, 2010 8:33 pm
by dmpp
I should note, I'm using 2.6.2
Re: Use php includes?
Posted: Thu Mar 18, 2010 8:38 am
by david_de
As I recall includes were at one time allowed but then removed to avoid security problems. I just change the template when I change the includes so it all matches. A little extra work. Perhaps one day a secure way to use include files will be found.
Re: Use php includes?
Posted: Fri Mar 19, 2010 3:16 pm
by R0CKY
Hi
I have been trying for a while to achieve the exact same thing - so I can pull in my site wide footer.
I achieved this on another script similar to the FAQ one by using the following code
Code: Select all
{include_php file='../inc-footer.html'}
Alas it did not work in phpMyFAQ - you could try it though.
Re: Use php includes?
Posted: Sat Apr 03, 2010 6:45 am
by Thorsten
Hi,
we don't support PHP includes in our templates due to security risks.
bye
Thorsten
Re: Use php includes?
Posted: Thu Nov 24, 2011 12:07 pm
by 40k
Hi,
is there a way to implement php code in a template?
cu 40k
Re: Use php includes?
Posted: Thu Nov 24, 2011 2:59 pm
by Thorsten
Hi,
no.
bye
Thorsten
Re: Use php includes?
Posted: Fri Jan 20, 2012 1:12 pm
by spambanjo
My work around for this was to use a simple Ajax call to render a php file then inject the resulting content into a div.
Unfortunately I work in MooTools rather than jQuery, so I had to disable a great deal of front end functionality, but I know this is possible in jQuery too.