RoxyFile 文件浏览器中基于 ID 的特定文件夹
Specific folder based on ID in RoxyFile file browser
是否可以根据客户ID设置上传文件夹?
示例: 客户获得 ID:2543(存储在会话中)
配置:
{
"FILES_ROOT": "fileman/uploads/2543 ", // "fileman/uploads/CUSTOMERID "
"RETURN_URL_PREFIX": "http://localhost/",
"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": "",
"DELETEDIR": "",
"MOVEDIR": "php/movedir.php",
"COPYDIR": "php/copydir.php",
"RENAMEDIR": "",
"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 csv json php css html exe",
"ALLOWED_UPLOADS": "",
"FILEPERMISSIONS": "0644",
"DIRPERMISSIONS": "0755",
"LANG": "auto",
"DATEFORMAT": "dd/MM/yyyy HH:mm",
"OPEN_LAST_DIR": "yes"
}
只有 customerID 正确的客户才能看到他的文件夹。所以没有人可以触摸其他成员文件夹。
我在网上搜索了有关它的信息,但找不到任何解决方案。
您需要修改配置文件并更改以下行:
"SESSION_PATH_KEY": "roxyFilePath"
然后你需要在调用 Roxy filemanager 之前设置这个会话变量。使用 PHP 可以使用带有
的用户 ID 将其设置为正确的值
$_SESSION["roxyFilePath"] = "Uploads/user/2543"
您也可能会发现阅读这个 SO 问题也很有用 PHP- RoxyFileMan set FILES_ROOT path dynamically
是否可以根据客户ID设置上传文件夹?
示例: 客户获得 ID:2543(存储在会话中)
配置:
{
"FILES_ROOT": "fileman/uploads/2543 ", // "fileman/uploads/CUSTOMERID "
"RETURN_URL_PREFIX": "http://localhost/",
"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": "",
"DELETEDIR": "",
"MOVEDIR": "php/movedir.php",
"COPYDIR": "php/copydir.php",
"RENAMEDIR": "",
"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 csv json php css html exe",
"ALLOWED_UPLOADS": "",
"FILEPERMISSIONS": "0644",
"DIRPERMISSIONS": "0755",
"LANG": "auto",
"DATEFORMAT": "dd/MM/yyyy HH:mm",
"OPEN_LAST_DIR": "yes"
}
只有 customerID 正确的客户才能看到他的文件夹。所以没有人可以触摸其他成员文件夹。
我在网上搜索了有关它的信息,但找不到任何解决方案。
您需要修改配置文件并更改以下行:
"SESSION_PATH_KEY": "roxyFilePath"
然后你需要在调用 Roxy filemanager 之前设置这个会话变量。使用 PHP 可以使用带有
的用户 ID 将其设置为正确的值$_SESSION["roxyFilePath"] = "Uploads/user/2543"
您也可能会发现阅读这个 SO 问题也很有用 PHP- RoxyFileMan set FILES_ROOT path dynamically