Hi I’m trying to read a PHP file. The complete contents of which needs to be assigned to a variable. The problem is when PHP reads the contents of the file it’s missing about 100 (one hundred) of the lines. The problem is the starting PHP tag on line 1:
<?php
When this is removed file_get_contents() works fine and all of the lines are returned. Does anyone know how to get over this?
Here is the code i'm running:
$contents = file_get_contents('exampleFile.php');
print $contents;
I have omitted ‘exampleFile.php’ as it is 150 lines long but I can paste it in if required?
Thanks
Jon