Showing PHP in static page

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
jeebus4k
Posts: 2
Joined: Thu Jul 23, 2009 4:22 am

Showing PHP in static page

Post 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.
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Showing PHP in static page

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Showing PHP in static page

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
jeebus4k
Posts: 2
Joined: Thu Jul 23, 2009 4:22 am

Re: Showing PHP in static page

Post 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 ?
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Showing PHP in static page

Post 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".
=Don=
Post Reply