woff 發表於 2010-2-17 17:13:02

FCKeditor 2.6.5版 使用方法

預設FCKeditor目錄為 editor
在該目錄下使用方法如下:
<?php

include("fckeditor.php");
$sBasePath = $_SERVER['PHP_SELF'];
$sBasePath = dirname($sBasePath).'/';
$ed = new FCKeditor('con');
$ed->BasePath= $sBasePath

?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form1">
<table cellpadding="0" cellspacing="0" border="1" width="100%">
<tr><td>主題:</td><td><input type="text" name="title" /></td></tr>
<tr><td>內文:</td>
<td><?php $ed->Create(); ?></td>
</tr>
<tr><td colspan="2"><input type="submit" name="send" value="發文"/></td></tr>
</table>
</form>

如果要編輯的檔案要放在跟目錄下的處理方法
修改上述找到include("fckeditor.php");
$sBasePath = $_SERVER['PHP_SELF'];
$sBasePath = dirname($sBasePath).'/';
$ed = new FCKeditor('con');
$ed->BasePath= $sBasePath

更改為
include("editor/fckeditor.php");
$ed = new FCKeditor('con');
$ed->BasePath= 'editor/';

如果不這樣改會顯示此網頁不存在

QOOQOO5320 發表於 2012-7-30 00:46:01

必須頂.............
頁: [1]
查看完整版本: FCKeditor 2.6.5版 使用方法