[問題] fckeditor路徑

看板Web_Design作者 (阿U)時間12年前 (2012/07/21 21:30), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串1/1
我最近在使用fckeditor 新增文章等已經ok 現在要使用上傳圖片 到了/FCKeditor/editor/filemanager/connectors/php/config.php 裡去改設定時 不論$Config['UserFilesPath'] ='/news/'; 和 $Config['UserFilesAbsolutePath'] = '' ; 怎麼改都沒辦法成功(圖片在網頁上沒辦法顯示) 想把圖片存在放網頁index.php那個資料夾裡的news的資料夾 我的程式是這樣寫的 $editor = new FCKeditor("content"); // 指定FCKeditor資料夾的相對路徑 $BasePath = $_SERVER['PHP_SELF']; $BasePath = substr($BasePath, 0, strpos($BasePath,"post_paper.php")); $BasePath .= "FCKeditor/"; // => "/example/FCKeditor/" $editor->BasePath = $BasePath; // 指定FCKeditor編輯器的高度 $editor->Height = 400; // 指定FCKeditor編輯器的工具列名稱 $editor->ToolbarSet = "Basic"; // 建立FCKeditor編輯器 $editor->Create(); 我的主機資訊是 網頁目錄/home/daltone/public_html 使用者根目錄/home/daltone 請有經驗的大大幫我解決了! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 111.250.249.195

07/21 22:43, , 1F
傳到的資料夾不在公開web位置吧
07/21 22:43, 1F
已解決 原因是在寫入資料庫時用到跳脫字元的函式 將' " ' 變成 ' /" ' 謝謝一樓 ※ 編輯: sing10407 來自: 111.250.221.122 (07/22 14:27)

07/23 14:52, , 2F
可以改用ckeditor
07/23 14:52, 2F
文章代碼(AID): #1G2gxd-W (Web_Design)