PHP Version 5.3.3-1 Ubuntu 10.10 Apache 2.2
Ckeditor 3.6.1
Я могу редактировать и сохранять, но редактируемая веб-страница не обновляется? Отредактированный текст появится в новом окне. Я хочу, чтобы редактируемая мной веб-страница была обновлена.
ckeditor.js
, test.html
и posteddata.php
находятся в одном каталоге /var/www/
test.html
< head>
< title>Test Page < /title >
< meta http-equiv="content-type" content="text/html; charset=utf-8"/ >
< script type="text/javascript" src="ckeditor.js">< /script >
< /head >
< body >
< form action="posteddata.php" method="post" >
< textarea id="editor1" name="editor1" >
<p>Your text goes here</p>
< /textarea>
< script type="text/javascript" >
window.onload = function()
{CKEDITOR.replace( 'editor1' );};
< /script>
< input type="submit" value="Submit"/ >
< /form>
< /body>
< /html>
posteddata.php
<code>< ?php
if ( isset( $_POST ) )
$postArray = &$_POST ; // 4.1.0 or later, use $_POST
else
$postArray = &$HTTP_POST_VARS ; // prior to 4.1.0, use HTTP_POST_VARS
foreach ( $postArray as $sForm => $value )
{
if ( get_magic_quotes_gpc() )
$postedValue = htmlspecialchars( stripslashes( $value ) ) ;
else
$postedValue = htmlspecialchars( $value ) ; ?>
< tr>
< th style="vertical-align: top"><?php echo htmlspecialchars($sForm); ?>
< /th>
< td><pre class="samples"><?php echo $postedValue?>
<? php}
?>