1
gabrielk
Re: Using PHP within a Theme File
  • 2006/2/28 22:39

  • gabrielk

  • Just popping in

  • Posts: 2

  • Since: 2006/2/28


Here's a sample of the code below. I've double checked the syntax (and did catch an error the first time around), but what's happening now doesn't quite seem like a syntax error. Basically, when I put the PHP code in the source of theme.html, it gets output on the final pagein the code as though it didn't get executed, just printed. So here's a sample of what I'm inputting...and when I view the pace, the source looks exactly like this:

CODE:

$here = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'];
if(strpos($here, 'modules/news')===true) {
// News/home page.
$box = 'box-home.swf';
$image = '';
} else {
// Default page.
$box = 'box-home.swf';
$image = 'Rene_Antonio_Intro.swf';
}
?>
27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/swflash.cab#version=6,0,29,0" width="222" height="197">







2
gabrielk
Using PHP within a Theme File
  • 2006/2/28 17:46

  • gabrielk

  • Just popping in

  • Posts: 2

  • Since: 2006/2/28


Hi,

I'm new to working with Xoops. I inserted some PHP code into my /themes/mytheme/theme.html file, however when I view the page, the PHP is printed in the source code and not actually executed. Any help as to what's going on, and how to get the PHP code to actually execute would be much appreciated, I'm stumped! :)




TopTop



Login

Who's Online

145 user(s) are online (67 user(s) are browsing Support Forums)


Members: 0


Guests: 145


more...

Donat-O-Meter

Stats
Goal: AU$15.00
Due Date: Jul 31
Gross Amount: AU$0.00
Net Balance: AU$0.00
Left to go: AU$15.00
Make donations with PayPal!

Latest GitHub Commits