How to output the read html file as a character! This post was last edited by storylok in 2014-01-0923: 20: 42 & lt ;! DOCTYPE & nbsp; html & nbsp; PUBLIC & nbsp; "-// How to output the read html file as a character!
This post was last edited by storylok at 23:20:42 on
Untitled Document
$ DocumentRoot = $ _ SERVER ['document _ root'];
$ A = readfile ("$ DocumentRoot/index-1.html ");
?>
I want to display the tag when the html file is output. After the current output, it is output according to the original meaning. I can use the following method to display it correctly. Is the readfile () function not capable of string output? Will he execute the prototype output?
If I use
Untitled Document
$ DocumentRoot = $ _ SERVER ['document _ root'];
$ A = fopen ("$ DocumentRoot/index-1.html", 'RB ');
While (! Feof ($ )){
$ Aa = fgets ($ a, 999 );
Echo $ aa;
}
?>
------ Solution --------------------
$new = htmlspecialchars("Test", ENT_QUOTES);
echo $new;
?>