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
Another plugin for this task is
DynPages.
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 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
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/sy...onfig.html
and in our wiki you find how to configure the editor
here is something:
http://docs.cksource.com/ckeditor_api/sy...ctedSource
when you add this line to a configuration file,
Code:
config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // PHP code
PHP-code will be protected