There are hundreds of places in my project that contain the following code:
include $root . $template;
Where $rootis the document root for the corresponding part of CRM, and $templateis the HTML template file. The variable $rootis different for different parts of CRM.
Now I want all parts of CRM to use the same template file. I can't just change $rootto the root of the central document, because the code uses other places that use this variable. I just want to change it to load a template.
Is there a way to save time, so I donβt have to iterate over all the places in my code where this appears? Is it possible for a string to $templateoverwrite a string $rootwhen concatenating?
i.e.
$root="$_SERVER['document_root']."\some_folder";
$template="[something_to_ignore_concatination?]".$_SERVER['document_root']."\template_file";
//So $root.$template = just $template