Use php includes?

You made an own skin or theme for phpMyFAQ. You can share it here with others!

Moderator: Thorsten

Post Reply
dmpp
Posts: 12
Joined: Tue Mar 16, 2010 8:24 pm

Use php includes?

Post 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?
dmpp
Posts: 12
Joined: Tue Mar 16, 2010 8:24 pm

Re: Use php includes?

Post by dmpp »

I should note, I'm using 2.6.2
david_de
Posts: 72
Joined: Tue Dec 13, 2005 12:09 am

Re: Use php includes?

Post 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.
R0CKY
Posts: 62
Joined: Mon May 19, 2008 9:18 pm

Re: Use php includes?

Post 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.
Rocky.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Use php includes?

Post by Thorsten »

Hi,

we don't support PHP includes in our templates due to security risks.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
40k
Posts: 1
Joined: Thu Nov 24, 2011 12:00 pm

Re: Use php includes?

Post by 40k »

Hi,

is there a way to implement php code in a template?

cu 40k
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Use php includes?

Post by Thorsten »

Hi,

no.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
spambanjo
Posts: 2
Joined: Fri Jan 20, 2012 11:31 am

Re: Use php includes?

Post 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.
When will these idiots learn that there's only three dots in an ellipsis.........
Post Reply