I have a fileA.php that contains:
<?php $cdn = 'example.org/folder/'; ?>
and file1.php , file2.php .....to.... file20000.php that have:
<?php
$lawyer_photo = $cdn . 'lawyername_image.jpg';
include 'fileA.php';
echo '<img src="'. $lawyer_photo . '">';
?>
Because we have fileA.php included after variable $lawyer_photo
the output will not add $cdn
, so instead of having :
<img src="example.org/folder/lawyername_image.jpg">
we get
<img src="lawyername_image.jpg">
Of course this is normal, but my question is if there is a way to modify fileA.php in a way that file1.php , file2.php .....to.... file20000.php will work as desired and get the $cdn
variable correctly?
Any suggestion?