找回密碼
 註冊
搜索
查看: 2139|回復: 3

[教學] FCKeditor 2.6.5版 使用方法

[複製鏈接]
發表於 2010-2-17 17:13:02 | 顯示全部樓層 |閱讀模式
 
Push to Facebook
預設FCKeditor目錄為 editor
在該目錄下使用方法如下:
  1. <?php

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

  7. ?>
  8. <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form1">
  9. <table cellpadding="0" cellspacing="0" border="1" width="100%">
  10. <tr><td>主題:</td><td><input type="text" name="title" /></td></tr>
  11. <tr><td>內文:</td>
  12. <td><?php $ed->Create(); ?></td>
  13. </tr>
  14. <tr><td colspan="2"><input type="submit" name="send" value="發文"/></td></tr>
  15. </table>
  16. </form>
複製代碼


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


更改為
  1. include("editor/fckeditor.php");
  2. $ed = new FCKeditor('con');
  3. $ed->BasePath= 'editor/';
複製代碼

如果不這樣改  會顯示  此網頁不存在
 
發表於 2012-7-30 00:46:01 | 顯示全部樓層
必須頂.............  
版主招募中
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Archiver|手機版|小黑屋|TShopping

GMT+8, 2025-5-1 01:28 , Processed in 0.020645 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回復 返回頂部 返回列表