I am trying to use savant and having a few odd problems. I plan on
making a simple DB driven site where the majority of the content is held
in the DB. I have created a basic template (header, footer, nav and
content) to just echo out the content (the content will have a html to
format it the way I want). Simple right.
Problem: All the html mark up is being ignored and the content is just
"dumping" there. Check for htmlentities you say... did and they are
there. So I try to get rid of it with html_entity_decode - thus giving
me my html formating back right? Wrong. Same problem. Am I missing
something?
index.php
// here we get content. Normally this will be by pulling it out of
the DB
$savant->content = '
<center>
<h2>This is a test of the Emergency Broadcasting System</h2>
<p>This is <font color="#008000" size="5">ONLY</font> a test.
If this was a real emergancy information would be provided here. This
is a test.</p>
</center>';
$savant->display('page.tpl.php');
page.tpl.php
<div id="cont">
<?php
if(!empty($this->content))
{
echo "{$this->_($this->content)}";
echo '<----------------------- Break --------------------------->';
echo html_entity_decode($this->_($this->content));
}
?>
</div>
displayed in browser page:
<center> <h2>This is a test of the Emergency Broadcasting System</h2>
<p>This is <font color="#008000" size="5">ONLY</font> a test.</p>
</center><----------------------- Break --------------------------->
<center> <h2>This is a test of the Emergency Broadcasting System</h2>
<p>This is <font color="#008000" size="5">ONLY</font> a test.</p> </center>
browser page source:
<div id="cont">
<center>
<h2>This is a test of the Emergency Broadcasting System</h2>
<p>This is <font color="#008000" size="5">ONLY</font> a test.</p>
</center><----------------------- Break --------------------------->
<center>
<h2>This is a test of the Emergency Broadcasting System</h2>
<p>This is <font color="#008000" size="5">ONLY</font> a test.</p>
</center>
</div>
--
Respectfully,
Ligaya Turmelle
"Life is a game.... so have fun"
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php