In my code, I thought that I would set my template path thus:
$app_path = '/home/edited/public_html/';
if ((substr($app_path, -1) != '/') && (substr($app_path, -2) != '\\'))
{
$app_path .= '/';
}
define("APP_PATH", $app_path);
define("INCLUDE_PATH", APP_PATH."includes/");
define("CLASS_PATH", APP_PATH."classes/");
define("TEMPLATE_PATH", APP_PATH."templates/"); |
and then call the templates thus:
$objTBS->LoadTemplate(TEMPLATE_PATH.'home.html');
//---------------------------------------------
// Merge template data and display
//---------------------------------------------
$objTBS->Show(); |
However, I see that produces an error:
TinyButStrong Error with LoadTemplate() method : file 'TEMPLATE_PATHhome.html' is not found or not readable.
However, if I assign the path to a variable, thus:
$template_path = "/home/edited/public_html/templates/"; |
And then use:
$objTBS->LoadTemplate($template_path.'home.html'); |
Is this the expected and correct behaviour? Why can't I use the define?