Page 1 of 1
PHP Includes
Posted: Fri Jul 28, 2006 3:36 pm
by THiNK
I am trying to use a PHP include within the template system using standard PHP:
Code: Select all
<?php @include_once($_SERVER["DOCUMENT_ROOT"]."/includedpage.php"); ?>
Thsi doesn't work when added to a template - What do I need to do to ensure this file is included?
Thanks,
Re: PHP Includes
Posted: Fri Jul 28, 2006 4:28 pm
by calguy1000
Check the FAQ in the wiki.
Re: PHP Includes
Posted: Sat Jul 29, 2006 8:38 am
by THiNK
calguy1000 wrote:
Check the FAQ in the wiki.
I have tried this (A1) :
http://wiki.cmsmadesimple.org/index.php/Developers_FAQ
However it does not work.
I added a user defined tag, added this code:
Code: Select all
@include_once($_SERVER["DOCUMENT_ROOT"]."/includedpage.php");
, called it 'include' and added {include} to my template but it doesn't work.
I did try
again, this caused an error.
Any ideas?
Re: PHP Includes
Posted: Sat Aug 05, 2006 8:18 pm
by Elijah Lofgren
THiNK wrote:
I did try
again, this caused an error.
Any ideas?
You're missing a "(" try this:
Also, maybe you could just paste the contents of includedpage.php into a User Defined Tag if it's not too large.
Re: PHP Includes
Posted: Sun Aug 06, 2006 3:24 pm
by cyberman
Elijah Lofgren wrote:
maybe you could just paste the contents of includedpage.php into a User Defined Tag if it's not too large.
What's the limit ?
Re: PHP Includes
Posted: Sun Aug 06, 2006 7:34 pm
by Elijah Lofgren
cyberman wrote:
Elijah Lofgren wrote:
maybe you could just paste the contents of includedpage.php into a User Defined Tag if it's not too large.
What's the limit ?
Looks like it's 65kb:
http://simon.incutio.com/archive/2002/0 ... TextLimits
Re: PHP Includes
Posted: Mon Aug 07, 2006 4:39 am
by cyberman
ThanksĀ

.