Include function php in template.html/php? Include function php in template.html/php?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Include function php in template.html/php?

Started by epsilon, February 07, 2004, 02:17:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

epsilon

Include function only works in .php extension files, ok but if i rename template.html to .php the gallery dont understand it.

What code i must change to run template.html as template.php?

Thankyou

hmmwv

i think it´s in include\init.inc

not sure so....

Pathos

line 113 of include/init.inc.php is where TEMPLATE_FILE is defined.

change:
define('TEMPLATE_FILE', 'template.html');

to:
define('TEMPLATE_FILE', 'template.php');

epsilon

I changed it and coppermine reads from template.php ok
But when it loads in the web dont run the include, very strange, if i put the complete url to template.php it runs the include well.

Pathos

You usally need to put at least the relavtive path to your includes in your script.

wouldn't theme.php be a better place todo the what ever it is your trying todo?

Joachim Müller

You can't insert php code into template.html, no matter what you rename it to.
PHP code has to go into theme.php!

Read the faq!

GauGau

epsilon

I want Split my templete.html in 2 parts, first one file header.php (the header that will be included in template.html/php) Do you know how can i do it?

Joachim Müller