2012-04-03, 18:52:54
I want to be able to display code such as:
In this form for tutorials about GetSimple. But even when I encode the < and > entities, they are still executed, making the code unable to be viewed and breaking the web page. This even goes for showing other bracketed codes:
I've had to insert spaces between the < and > signs, but I've seen other sites display their code just fine. Is there something I'm doing wrong, or could this be a server problem?
Thanks to whoever provides a solution!
Code:
<?php
/* Credit to ccagle8 for the original function; edited by Angryboy */
function get_author_username($blogusername) {
$file = GSDATAPAGESPATH . $blogusername .'.xml';
if (file_exists($file)) {
$p = getXML($file);
$authoruser = $p->authoruser;
echo $authoruser; }
}
?>
In this form for tutorials about GetSimple. But even when I encode the < and > entities, they are still executed, making the code unable to be viewed and breaking the web page. This even goes for showing other bracketed codes:
Code:
(% stuff in here %)
I've had to insert spaces between the < and > signs, but I've seen other sites display their code just fine. Is there something I'm doing wrong, or could this be a server problem?
Thanks to whoever provides a solution!