Page 1 of 1
How to present php code on a page?
Posted: Tue Oct 30, 2007 7:07 pm
by schemberg
Hi,
I try to present php sourcecode on my page:
... OK, different content.
I tried literal and tt, both don't works.
Anyone, who can help me?
Regards
Axel
p.s. I asked the same question in the german forum, but there was no solution.
Re: How to present php code on a page?
Posted: Tue Oct 30, 2007 7:26 pm
by RonnyK
Axel,
you can use :
{literal}Put the code here{/literal}
Ronny
Re: How to present php code on a page?
Posted: Tue Oct 30, 2007 7:35 pm
by schemberg
Hi Ronny,
thank you for the quick response. I tried to do so, but FCKEditor or TinyMCE delete content, so that the result ist:
Code: Select all
<p><code>{literal}{/literal}</code></p>
and the rest is missing.
...
Axel
Re: How to present php code on a page?
Posted: Tue Oct 30, 2007 7:45 pm
by RonnyK
Put the code inside the html-screen (HTML in Tiny, SRC in FCK), using that button, WYSIWYG wont do tricks with the provided content.
Ronny
Re: How to present php code on a page?
Posted: Tue Oct 30, 2007 7:48 pm
by schemberg
Hi Ronny,
yes that was what I did: HTML (not wysiwyg). But after switching between WYSIWYG and HTML the php-code is goneĀ
Regards
Axel
Re: How to present php code on a page?
Posted: Tue Oct 30, 2007 11:16 pm
by Pierre M.
Hello,
if you want to put PHP code in pages, you don't want to use wysiwyg, do you ?
Disable the wysiwyg in your preferences. (prefered wysiwyg editor = none)
Pierre M.
Re: How to present php code on a page?
Posted: Tue Oct 30, 2007 11:34 pm
by Nullig
It's better to just put your code in a UDT and call it on your page.
Create a UDT called infophp and put this in it:
Then, in your page call the UDT like this:
Nullig