PDA

View Full Version : Insérer un fichier .php dans un .tpl


Perrine
07-20-2006, 05:28 PM
Bonjour :)

Je souhaite installer un script en php pour suivre le passage des robots sur mon annuaire.

Il faut insérer 3 lignes en .php. J'ai naïvement cru qu'il fallait faire un copier / coller dans le footer.tpl mais j'ai vite déchanté :p
J'ai ensuite testé un {include file="xxx.php"} mais au lieu d'être interprété, le code est affiché dans la source HTML.

Alors, que faire ?
Merci par avance :)

Boby
07-20-2006, 05:30 PM
I don't speak french, but this might help you:
http://smarty.php.net/manual/fr/language.function.include.php.php

Boby

Perrine
07-20-2006, 06:26 PM
Thanks Boby for the link ;)

In fact, using {include_php} makes an error :
Content visible to registered users only.
So, I used {php} (http://smarty.php.net/manual/fr/language.function.php.php) to insert directly the code in footer.tpl and it works fine now ;)