Page 1 of 1

Showing PHP in static page

Posted: Thu Jul 23, 2009 5:30 am
by jeebus4k
Sounds simple but I have no clue about this.

I want to echo a code of php in a static page.

Any help appreciated.

Re: Showing PHP in static page

Posted: Thu Jul 23, 2009 12:56 pm
by onli
Hi
Don't know if that's the best way, but you probably could use smarty-markup to include php like Garvin described in http://board.s9y.org/viewtopic.php?p=85318#p85318.
sincerely

Re: Showing PHP in static page

Posted: Thu Jul 23, 2009 5:12 pm
by garvinhicking
Hi!

You want to show PHP code? Use the BB Markup plugin and put your PHP code inside [ code ] ... [ /code ] blocks (without the spaces).

Or, even better, use the GeSHI Markup plugin, but I don't know its formatting syntax by heart, so you'd have to google that up.

HTH,
Garvin

Re: Showing PHP in static page

Posted: Thu Jul 23, 2009 10:34 pm
by jeebus4k
garvinhicking wrote:Hi!

You want to show PHP code? Use the BB Markup plugin and put your PHP code inside [ code ] ... [ /code ] blocks (without the spaces).
Thanks for the replies !

But I need to execute a php code or include a php file in one static page .. i.e www.somesite.com/thispage.html

A plugin will be a overkill.

Any suggestion ?

Re: Showing PHP in static page

Posted: Thu Jul 23, 2009 11:35 pm
by Don Chambers
Read this: http://www.s9y.org/11.html#A33. The section you want is titled "How do I add php to my templates". There are other posts here if you search "include php".