There are hundreds of places in my project that contain the following code:
include $root . $template;
Where $root
is the document root for the corresponding part of CRM, and $template
is the HTML template file. The variable $root
is different for different parts of CRM.
Now I want all parts of CRM to use the same template file. I can't just change $root
to 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 $template
overwrite a string $root
when concatenating?
i.e.
$root="$_SERVER['document_root']."\some_folder";
$template="[something_to_ignore_concatination?]".$_SERVER['document_root']."\template_file";
//So $root.$template = just $template