Hi,
I have a .inc file that contains html codes. How do I use the include() to print the codes out onto the page so that others can select it and copy it?
I know there's htmlspecialchars(), but how do I pass the contents of the entrire file into this function?
I tried this and it does work:
PS: It contains many double-quotes.
Hope you can help.
regards
I have a .inc file that contains html codes. How do I use the include() to print the codes out onto the page so that others can select it and copy it?
I know there's htmlspecialchars(), but how do I pass the contents of the entrire file into this function?
I tried this and it does work:
PHP:
$contents = include ("html_test.inc");
$contents = htmlspecialchars($contents, ENT_QUOTES);
echo $contents;
PS: It contains many double-quotes.
Hope you can help.
regards
Last edited: