使用 FCKeditor

1 篇文章 / 0 new
author
使用 FCKeditor
include("...fckeditor/fckeditor.php");
session_start();
 
class zFCKeditor extends DCApp {
    public function view() {
        $this->pack('<link href="fckeditor/_samples/sample.css" rel="stylesheet" type="text/css" />');
        $this->pack("<form action='posteddata.php' method='post' target='_blank'>");
        $oFCKeditor = new FCKeditor('FCKeditor1');
        $oFCKeditor->BasePath = '.../fckeditor/'; //fckeditor library所在位置;
        $_SESSION['MyPath'] = $_SESSION['DC_LOGIN_ID'];//需利用 $_SESSION 來變更儲存路徑
        //rtlogger::notice($_SESSION);
        $oFCKeditor->Height = '400';
        $oFCKeditor->Value = "這是 <strong>預設內容</strong>.  <a href='http://www.fckeditor.net/'>FCKeditor</a>.";
        $this->pack($oFCKeditor->CreateHtml());
        $this->pack("<input type='submit' value='發送'></form>");
        $this->pack($this->end());
    }
}

上傳檔案路徑設定
fckeditor\editor\filemanager\connectors\php\config.php 內的 $Config['UserFilesPath']
Free Web Hosting