Page 1 of 1

Including PHP code on page; not working?

Posted: Sun Mar 19, 2006 8:10 pm
by exor
Hello,

I'm trying to include a PHP file on a CMS page, and according to the page preview, it works great.
However, when I finally submit the page, it'll only display the code between the {php} and {/php} tags.

For example:
In the page content: {php}include('gbook_view.php');{/php}
Results in: include('gbook_view.php');
Instead if including gbook_view.php, as the preview does.

Did I miss anything, or is this a bug? If so, are there any workarounds known?

Re: Including PHP code on page; not working?

Posted: Sun Mar 19, 2006 10:23 pm
by calguy1000
try this:

{literal}{/literal}

but the better way would be to create a user defined tag for this.

so all you would have to do is {my_user_defined_tag_name}