If you use PHP get_file_contents function, you need to make sure there are no other echo or print related statements other than the the variable or data that you want get_file_contents to get.
Else you get make not get any value or wrong value.
Also you need to ensure your files are given the right permission level.