Page 1 of 1

How to do a 2-level php include() in User defined tag?

Posted: Sun May 18, 2008 7:17 pm
by Howbag
Hello!
I have a proxy php-script that works perfectly standalone. The thing with this script is that it includes another php-file.

Tag -includes- index.php -includes- index.inc.php

So when I include it via the user defined tag-thing in admin, I end up with lots of errors coming from the second php script that should be included aswell.

Anyone know of a way to get around this?

Re: How to do a 2-level php include() in User defined tag?

Posted: Sun May 25, 2008 4:32 am
by Slagar
Hey Howbag, this may seem obvious, but would this work for you?

- Take the include out of your first external file
- Call your include UDT a second time, to include your second php file

So in your page you might have:
{ExtFile filename="file1.php"}
{ExtFile filename="file2.php"}

(Assuming 2-level PHP includes are not possible - I don't know, I haven't tried it:))