Pastebin
Paste #226:
< previous paste - next paste>
Pasted by Flawless
function read_file( $file, $defaultfile='' ) {
// open the HTML file and read it into $html
if (file_exists( $file )) {
$html_file = fopen( $file, "r" );
}
elseif( !empty( $defaultfile ) && file_exists( $defaultfile ) ) {
$html_file = fopen( $defaultfile, "r" );
}
else {
return;
}
$html = "";
while (!feof($html_file)) {
$buffer = fgets($html_file, 1024);
$html .= $buffer;
}
fclose ($html_file);
return( $html );
}
New Paste
Go to most recent paste.