I realised you are using an external html, and just replacing the placeholders with php,
so it should work, after the replace, just do echo $file and see if things go replaced,.
in case you put the template in the html part of a control application, you can use my previous advice , which i deleted but here is a reminder.
Php runs first, and changes html which is send to the user.
Therefore you need to enclose all variable fields in php open and close tag and echo the field using php syntax.
There are plenty of examples , this is how dynamic html is created.
For example (<?= is the same as <?php echo. , just a shorter notation )
my $AdresLable and $ObjectAddress are defined in the onload event of a control application. I guess you can use the fields variables directly , but if does not work , you need to define variables and assign values from the fields to them in the onload event.