2009-12-11 69 views
0

使用FCKeditor(2.6.5)當我使用上傳功能時,它的行爲就好像它已經工作(沒有錯誤),但沒有上傳文件。我可以使用ftp的文件管理器查看上傳文件夾中的其他文件,也可以使用fck創建文件夾。FCKeditor上傳功能不起作用,沒有錯誤

有什麼想法?

回答

1

您是否檢查過FCKeditor配置文件以獲取正確的值,並且您是否已將上傳文件夾中的權限設置爲對於運行上載腳本的任何進程都可寫?

0

剛剛通過這個自己。關鍵是要在着名的「move_uploaded_file」函數調用所在的PHP FckEditor FileUpload函數中放置一個錯誤處理函數。對我來說,這是一個權限問題,使得運行php的進程沒有寫入我的Web服務器擁有的目標文件目錄的權限。所以,因爲我沒有管理員到服務器我有兩個選擇,給足夠的權限,使PHP可以寫入它(開始充分和證明它的工作),然後找回它或其次使用PHP的FTP功能從文件複製臨時位置到結婚服務器擁有的目錄。他們的關鍵是使用您用來上傳網頁內容的相同ftp用戶。

2

我能解決編輯位於config.php文件中的問題

\fckeditor\editor\filemanager\connectors\php\config.php 

把正確的絕對路徑:

// Path to user files relative to the document root. 
$Config['UserFilesPath'] = '/userfiles/' ; 

// Fill the following value it you prefer to specify the absolute path for the 
// user files directory. Useful if you are using a virtual directory, symbolic 
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. 
// Attention: The above 'UserFilesPath' must point to the same directory. 
$Config['UserFilesAbsolutePath'] = 
+0

謝謝。我的問題是錯誤地把絕對路徑 – Silentbang 2015-07-25 06:25:21