if (!function_exists(file_get_contents)) {
// Define function and arguments
function file_get_contents($file, $include=false)
{
// Varify arguments are correct types
if (!is_string($file)) return(false);
if (!is_bool($include)) return(false);
// Open the file with givin options
if (!$handle = @fopen($file, rb, $include)) return(false);
// Read data from file
$contents = fread($handle, filesize($file));
// Close file
fclose($handle);
// Return contents of file
return($contents);
}
}
|