function readAll($filename) {
// $filename = "./source-code";
$contents = @file_get_contents($filename) or $contents = "";
return $contents;
}
- Using for reading small, medium text file
- We assume that if file doesn't exist or file isn't readable return value is empty string.