Jump to content

Include PHP file in template

Featured Replies

Posted

I'm sorry if this is answered somewhere already, I'm sure it is, I just can't find it!

What is the correct way to include a PHP file within a template file?

I have tried this:

{{include('../include/myfile.php');}}

This includes the correct file but the rest of the page is not displayed, instead there are lots of funny characters (see screenshot).

Is anyone able to offer any suggestions?

Thanks a lot.

Screen Shot 2018-02-13 at 16.11.11.png

Quote

{insert="$filename"}
Includes a PHP script file

Parameters
$filename - The filename of the PHP file to include. The output of the file is buffered and output.

 

  • Author

Great, thanks a lot, that's exactly what I needed.

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.