I have an interesting problem. I have the code below which takes $_POST['content']
and $_POST['page']
. The 'content' im attempting to write is "HTML" (see below) however, the content that is being actually written is
<footer>
<div class="grid_16">
<div class="wrapper">
<span class="right"><!-- {%FOOTER_LINK} --></span>
ie: a majority of the content is missing.
any guidance would be greatly appreciated
<?php
if (!$_POST['content'] && !$_POST['page'])
return false;
$content = $_POST['content'];
$page = $_POST['page'];
$fp = fopen('content/'.$page, 'w');
fwrite($fp, htmlspecialchars($content));
fclose($fp);
?>
$_POST['content']
is:
<footer>
<div class="grid_16">
<div class="wrapper">
<span class="right"><!-- {%FOOTER_LINK} --></span> l
la-panacee © 2013 |
<a href="privacyStatement.php">Privacy policy</a>
</div>
</div>
</footer>