I`m trying to load the contents of a php file, change some variables through a replace, and save it again, but upon loading, the file_get_contents doesn`t parse the start of the file for some reason. I tried this on my server and on the local server.
Example :
filesample.php :
<?php
$var1 = array('this' => 'that');
?>
read_file.php
<?php
$fp = file_get_contents('filesample.php');
echo '<pre>'.$fp.'</pre>';
?>
Output :
'that');
?>
Waiting for your thoughts and experiences.