MyBB Community Forums
how to include files in header - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: how to include files in header (/thread-185974.html)



how to include files in header - ishank - 2015-11-02

i want to include a php file in the header template how should i do it


RE: how to include files in header - Khankharor - 2015-11-02

try This..


ob_start();
include("/namefile.php");
$news = ob_get_clean(); 



RE: how to include files in header - ishank - 2015-11-02

(2015-11-02, 04:34 PM)Khankharor Wrote: try This..


ob_start();
include("/namefile.php");
$news = ob_get_clean(); 

what is ob_start


RE: how to include files in header - Ashley1 - 2015-11-02

http://php.net/manual/en/function.ob-start.php


RE: how to include files in header - SvePu - 2015-11-02

By default you can't integrate php functions into theme templates.
You'll need a plugin for this.