$file = 'file.txt'; // file
$contents = implode(file($file)); // hasil