Community @ The Turning Gate

Support community for TTG plugins and products.

You are not logged in.

#1 2018-10-08 03:07:08

Registered: 2015-11-03
Posts: 51

Use of PHP Includes Viable?

A Non-Backlight part of my website has pages where I use what's known as "PHP Include" which is a line of code pointing to content that can be integrated across more than one page, such as a table with dates, and such.

Instead of having to modify several documents with the same table content, from page to page — which can be very time consuming, let alone leaving a huge potential to create errors, omissions, and conflicting information — it's great to modify a single "PHP Include" document that updates all pages that point to it.

The line of code I use looks something like this:
<?php include("pho105_announce.php"); ?>

I'm just curious to ask if Backlight supports anything similar that I can use in more than one of my backlight/custom/phplugins documents to use the same tabled content? I tried integrating that line of code noted above, but no luck in generating anything in a web browser, even by using various iterations of "../../" in the doc name.

Thanks for giving this any thought...


#2 2018-10-08 03:42:28

rod barbee
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 14,936

Re: Use of PHP Includes Viable?

have you tried using an absolute url to the file?

Just a user with way too much time on his hands., Pangolin test site, Backlight 1.1.1 test site


#3 2018-10-08 13:07:20

Daniel Leu
Registered: 2012-10-11
Posts: 1,012

Re: Use of PHP Includes Viable?

I did a little test and it works for me. Did you get any errors? I put my test file in /backlight/custom/phplugins and tried with following two versions of using include:

// v1

include(realpath(BACKLIGHT_HOOK) . "/custom/phplugins/dlp_common.php"); 

Daniel Leu | Photography


Board footer

Powered by FluxBB