- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 63 guest(s) and 0 member(s) that are online. You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Header as template, with php tags not working [ ]
Author
Message
Tim
Private
Joined: Feb 09, 2003
Posts: 48
Location: Hegelsom, The Netherlands
Posted:
Sun Apr 27, 2003 7:13 am
Why doesn't the php code work in a template html file?
(I use a modified version of the FiApple theme)
Here's the code that calls the template:
Code:
$tmpl_file = "themes/AI/header.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
Can't I use <?php ?> code then?
Raven
General
Joined: Mar 22, 2003
Posts: 5233
Location: USA
Posted:
Sun Apr 27, 2003 7:16 am
Edited by Raven - Removed because I misread the code. Sorry!
_________________ Those who hear not the music think the dancers mad.
Raven Web Hosting |My Scripts & Stuff Last edited by Raven on Sun Apr 27, 2003 7:33 am; edited 1 time in total
ArtificialIntel
Joined: Jan 31, 2004
Posts: -88
Posted:
Sun Apr 27, 2003 7:31 am
actually, it's because the only file type that you can run php script in by default is .php or possibly .php3 if ur host has enabled it.
It requres mods to the apache setup to parse .html files through the PHP module too
AI
Tim
Private
Joined: Feb 09, 2003
Posts: 48
Location: Hegelsom, The Netherlands
Posted:
Sun Apr 27, 2003 8:35 am
ah.. thx
so would it help to let the templates be .php files?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum