php下配置使用FCKeditor控制項

來源:互聯網
上載者:User

關於下載在上一篇文章中已經提到過了,在這裡就不再次說明了。

 

1)複製檔案

把FCKeditor解壓到自己的php網站目錄下。存放位置隨意,這裡我預設是在根目錄下

 

2)調用fckeditor.php類檔案

<?php

include("fckeditor/fckeditor.php") ; // 用於載入FCKeditor類檔案

?>

 

 

 

3)執行個體化控制項,你可以把它放在表單中你想要顯示的位置中,方便取值

<?php<br />$oFCKeditor = new FCKeditor('FCKeditor1') ; // 建立FCKeditor執行個體<br />$oFCKeditor->BasePath = './fckeditor/'; // 設定FCKeditor目錄位址<br />$FCKeditor->Width='100%'; //設定顯示寬度<br />$FCKeditor->Height='300px'; //設定顯示高度的高度<br />$oFCKeditor->Create() ; // 建立編輯器<br />?><br />

4)取值:直接通過$_request[]獲得該控制項的值

5)這時候你可能發現檔案和圖片的上傳瀏覽功能無法實現。你需要進行一下配置

一、開啟fckeditor/editor/filemanager/upload/php/config.php,找到代碼$Config['Enabled'],將值設定為true
二、接下來幾行,設定$Config['UserFilesPath'],設定上傳路徑。
三、開啟fckeditor/fckconfig.js檔案,找到代碼_FileBrowserLanguage,將值設定為php。接下來一行,把_QuickUploadLanguage值也設定為php。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.