2014-12-26 187 views
0

我對roxyfileman的微小MCE工作,我整合了成功TinyMCE的的Roxyfileman,它做工精細,PHP的RoxyFileMan設置FILES_ROOT路徑動態

但基於我想在列出目錄的用戶文件管理器列表。但我滯後如何值在conf.json分配用於FILES_ROOT動態針對各個用戶

例如:

--Uploads/userupload/{用戶ID} - {用戶名} {用戶標識} - {用戶名}是生成一個文件夾動態

我需要在FILES_ROOT在FILEMAN

{ 
"FILES_ROOT":   "/uploads/userupload/", 
"RETURN_URL_PREFIX": "", 
"SESSION_PATH_KEY": "", 
"THUMBS_VIEW_WIDTH": "140", 
"THUMBS_VIEW_HEIGHT": "120", 
"PREVIEW_THUMB_WIDTH": "100", 
"PREVIEW_THUMB_HEIGHT":"100", 
"MAX_IMAGE_WIDTH":  "1000", 
"MAX_IMAGE_HEIGHT": "1000", 
"INTEGRATION":   "tinymce4", 
"DIRLIST":    "php/dirtree.php", 
"CREATEDIR":   "php/createdir.php", 
"DELETEDIR":   "php/deletedir.php", 
"MOVEDIR":    "php/movedir.php", 
"COPYDIR":    "php/copydir.php", 
"RENAMEDIR":   "php/renamedir.php", 
"FILESLIST":   "php/fileslist.php", 
"UPLOAD":    "php/upload.php", 
"DOWNLOAD":   "php/download.php", 
"DOWNLOADDIR":   "php/downloaddir.php", 
"DELETEFILE":   "php/deletefile.php", 
"MOVEFILE":   "php/movefile.php", 
"COPYFILE":   "php/copyfile.php", 
"RENAMEFILE":   "php/renamefile.php", 
"GENERATETHUMB":  "php/thumb.php", 
"DEFAULTVIEW":   "list", 
"FORBIDDEN_UPLOADS": "zip js jsp jsb mhtml mht xhtml xht php phtml php3 php4 php5 phps shtml jhtml pl sh py cgi exe application gadget hta cpl msc jar vb jse ws wsf wsc wsh ps1 ps2 psc1 psc2 msh msh1 msh2 inf reg scf msp scr dll msi vbs bat com pif cmd vxd cpl htpasswd htaccess", 
"ALLOWED_UPLOADS":  "", 
"FILEPERMISSIONS":  "0644", 
"DIRPERMISSIONS":  "0755", 
"LANG":    "auto", 
"DATEFORMAT":   "dd/MM/yyyy HH:mm", 
"OPEN_LAST_DIR":  "yes" 
} 

回答

2

分配這條路你必須先做定義會話瓦爾。例如,你在你的配置文件這樣寫:

"SESSION_PATH_KEY": "myRoxySession" 

現在你必須設置你的代碼寫入到這個會議無功在正確的道路開始樂聲文件管理器前。以PHP爲例:

$_SESSION["myRoxySession"] = "Uploads/userupload/{userid}-{username} {userid}-{username}" 

這應該是有效的。

+0

其中sholud添加此代碼? –

+0

文件管理器的根目錄中有一個conf.json。您必須在您的應用代碼 – kasoft

+0

中設置的會話可以引導我做什麼sholud? sholud我先設置FILES_ROOT?然後設置SESSION_PATH_KEY?我在我的管理頁面這樣做,我插入圖像到我的內容我設置$ _SESSION ['name'] = ROOT_PATH。「estekhdami/agahi_content_images /」; –

0

首先打開FILEMAN目錄conf.json樣本配置

 
"FILES_ROOT":   "", // empty 
"SESSION_PATH_KEY": "dynamic-user-folder" // $_session["dynamic-user-folder"] 

保存關閉配置文件。現在打開PHP文件中添加代碼,

 
if (session_status() == PHP_SESSION_NONE) { 
    session_start(); 
}; 

$firma_slug = "/alpc-bilgisayar-aladag-n1qux"; // sample user dynamic folder name 

$_SESSION["dynamic-user-folder"] = "/firma".$firma_slug; 

樣本文件夾名稱firma/焦炭根目錄

結果:root/firma/alpc-bilgisayar-aladag-n1qux // upload directory

感謝user3265427