note 21831 deleted from function.htmlentities by spic

From: Date: Thu, 19 Sep 2002 21:32:27 +0000
Subject: note 21831 deleted from function.htmlentities by spic
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-36987@lists.php.net to get a copy of this message
If you want to display the source of an HTML file you have, just insert the following code wherever you want to display the code: $content = file($DOCUMENT_ROOT . "YOUR_DOCUMENT.html"); $content = implode("", $content); $content = htmlentities($content); $content = ereg_replace ("\n", "<br>", $content); $content = ereg_replace (" ", "&nbsp;", $content); print ( $content );

« previous php.notes (#36987) next »