Topic: Using php within the page

I suppose this has been answered 100 times by  now but how do I insert a simple php include on a page? I tried to it in source but it keeps adding <p> before the code and won't act on it, so I know I'm doing something wrong.

I'd appreciate any help I can get. I'm spending hours on this.

Thanks.

don

Re: Using php within the page

http://get-simple.info/extend/plugin/exec-php/17/

|--
Die deutsche GetSimple-Webseite: http://www.Get-Simple.de = the german Get-Simple-Website!
Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forum/forum/16/german-deutsch/

Re: Using php within the page

Another plugin for this task is DynPages.

Re: Using php within the page

Thanks, Connie, but there's no doc for this and I can't figure out how to use it. Perhaps you can answer: after enabling the plugin what do I put on the page itself?

Don

Re: Using php within the page

when you have activated the plugin, you can just enter the php-code in the editor (in source code view)

Or you add that code into a component and use that component in your template.

just activate it and add

<?php
echo "hello world";
?>

into the source code of a page and see what happens

Cheers, Connie

|--
Die deutsche GetSimple-Webseite: http://www.Get-Simple.de = the german Get-Simple-Website!
Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forum/forum/16/german-deutsch/

Re: Using php within the page

Connie wrote:

when you have activated the plugin, you can just enter the php-code in the editor (in source code view)

Or you add that code into a component and use that component in your template.

just activate it and add

<?php
echo "hello world";
?>

into the source code of a page and see what happens

Cheers, Connie

Connie, thanks so much for the help.

When I plug that code into the source, save it, then view it -- it works great.
But if i go back into source view it comments out my code. Is it supposed to do that? I think that's what was happening to my code. Every time I went back into source view to adjust it, the editor would comment everything out.

Don

Re: Using php within the page

Don,

I think this is part of the editor configuration

If you use the HTML-Editor (I am sure), you have the chance to define options that the editor will not comment out that code

unfortunately I am just on the hop to travel back to Hamburg, so I can't fiddle out which setting it is

the optionslist is somewhere here: http://docs.cksource.com/ckeditor_api/s … onfig.html

and in our wiki you find how to configure the editor

here is something:

http://docs.cksource.com/ckeditor_api/s … ctedSource

when you add this line to a configuration file,

config.protectedSource.push( /<\?[\s\S]*?\?>/g );   // PHP code

PHP-code will be protected

|--
Die deutsche GetSimple-Webseite: http://www.Get-Simple.de = the german Get-Simple-Website!
Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forum/forum/16/german-deutsch/