I use a script to download a .pdf file :
The following is from Application #1 DnLdPageB.php and works very well, no problems.
<?php
header("Content-Type: application/pdf");
header("Content-Disposition: attachment; filename=.\Dox\WeightForMen2015.pdf");
readfile(".\Dox\WeightForMen2015.pdf");
?>
The following is from Application #2 DnLdPageB.php does not work and gives an error "invalid value for registry"
<?php
header("Content-Type: application/pdf");
header("Content-Disposition: attachment; filename=.\Dox\Teachingandlearning.pdf");
readfile(".\Dox\Teachingandlearning.pdf");
?>
In both cases the folder \Dox is in the same location with respect to the rest of the code. For example at my external server, index.php is in \httpdocs and so is \Dox.
I cannot find what I've done wrong. I am looking for some spelling mistake or something like this, but I cannot find anything.
Can anyone suggest how to debug this mistake, please ?