How to read a file into a string using PHP
function ReadFile($filename)
{
$fh = fopen($filename, 'r');
$theData = fread($fh, filesize($filename));
fclose($fh);
return $theData;
}
Head of Developer Experience & Relations at Hookdeck
function ReadFile($filename)
{
$fh = fopen($filename, 'r');
$theData = fread($fh, filesize($filename));
fclose($fh);
return $theData;
}