phpBB.de - Die deutsche phpBB-Community
Stand: 30.12.2008 04:56
aktuelle Version auf phpBB.de
 
Apache At Work Communities Community Building Informationen und Hinweise Installation/Konfiguration/Update MySQL PHP phpBB-Optimierungen phpBB3 Rechtliches Server & Technik Snippets Templates und Mods
 



Knowledge Base Offline -> Server & Technik -> PHP -> Wie binde ich PHP-Code in eine .tpl-Datei ein?

Wie binde ich PHP-Code in eine .tpl-Datei ein?
Autor: Dwing
Stand: 30.12.2008 04:56
Neuste Version unter: http://www.phpbb.de/doku/kb/include_tpl

Wie binde ich PHP-Code in eine .tpl-Datei ein?

Anleitung zum Einbinden einer .php-Datei in eine .tpl-Datei
Öffne die entsprechend php-Datei, die zum Template gehört und suche

Code:
$template->assign_vars(array(


Danach einfügen:
Zitat:
'WHAT_INCLUDE' => file_get_contents('pfadzurdatei'),


speichern.

Wenn die einzubindende Datei eine .php Datei ist, muss pfadzurdatei in der Form http://www.deinserver.de/pfad/datei.php sein.

Öffne das Template und füge an der Stelle, an der der Include sein soll, {WHAT_INCLUDE} ein.



Knowledge Base Offline -> Server & Technik -> PHP -> Wie binde ich PHP-Code in eine .tpl-Datei ein?