how to convert text file to string in php code example Example: turn text file to string php $fileContent = file_get_contents($url);