Using php within the page - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16) +--- Thread: Using php within the page (/showthread.php?tid=2040) |
Using php within the page - dondemaio - 2011-08-04 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 Using php within the page - Connie - 2011-08-04 http://get-simple.info/extend/plugin/exec-php/17/ Using php within the page - polyfragmented - 2011-08-04 Another plugin for this task is DynPages. Using php within the page - dondemaio - 2011-08-04 Connie Wrote:http://get-simple.info/extend/plugin/exec-php/17/ 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 Using php within the page - Connie - 2011-08-04 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 Using php within the page - dondemaio - 2011-08-05 Connie Wrote:when you have activated the plugin, you can just enter the php-code in the editor (in source code view) 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 Using php within the page - Connie - 2011-08-05 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/symbols/CKEDITOR.config.html and in our wiki you find how to configure the editor here is something: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.protectedSource when you add this line to a configuration file, Code: config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // PHP code PHP-code will be protected |