php/ckEdit.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Walters CKEditor Sample</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<link href="../../ckeditor/_samples/sample.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- This <div> holds alert messages to be display in the sample page. -->
<div id="alerts">
<noscript>
<p>
<strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
support, like yours, you should still see the contents (HTML data) and you should
be able to edit it normally, without a rich editor interface.
</p>
</noscript>
</div>
<!-- This <fieldset> holds the HTML code that you will usually find in your pages. -->
<?php
$filename = "ckEditorTest.html"; ?>
<form action="ckEdit.php" method="post">
<p>
<label for="editor1">
edit <? echo $filename . "sizeof POST = " . sizeof($_POST) . "<br> print post <br>";print($_POST);
while (($e1=each($_POST)) !== FALSE):
printf("<br> key %s value %s", $e1['key'], $e1['value']);
endwhile;
?> <br> endwhile </label>
</p>
<p>
<input type="text" name="fiNa" value=<?php echo '"' . $filename . '"' ?>/>
<p>
<?php
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
// Path to the CKEditor directory, ideally use an absolute path instead of a relative dir.
// $CKEditor->basePath = '/ckeditor/'
// If not set, CKEditor will try to detect the correct path.
$ckPa = '../../ckeditor/';
// Include the CKEditor class.
include_once "${ckPa}ckeditor_php5.php";
// Create a class instance.
$CKEditor = new CKEditor();
$CKEditor->basePath = $ckPa;
// Create a textarea element and attach CKEditor to it.
$CKEditor->editor("editor1", $contents);
?>
<input type="submit" value="Submit"/>
</p>
</form>
<div id="footer">
<hr />
<p>
walter6
</p>
</div>
</body>
</html>