为Zen Cart后台的编辑器改变存储路径,以防止安全隐患

编辑器目录存放路径,比如de
define(‘DIR_WS_EDITORS’, ‘ed/’);
第二步:将 Zen Cart 根目录下的 editors 改名为 ed

第三步:改掉后台烦人的默认编辑器路径不存在的提示:

You have an HTML editor selected in ‘My Store’ but the ‘/editors/’ folder cannot be located. Please disable your selection or move your editor files into the ‘/editors/’ folder

打开 your_admin/includes/header.php 文件,搜索

ERROR_EDITORS_FOLDER_NOT_FOUND


// Editor alerts
if (HTML_EDITOR_PREFERENCE != ‘NONE’ && !is_dir(DIR_FS_CATALOG . ‘editors’)) {
$messageStack->add(ERROR_EDITORS_FOLDER_NOT_FOUND, ‘caution’);
}
替换为
// Editor alerts
if (HTML_EDITOR_PREFERENCE != ‘NONE’ && !is_dir(DIR_FS_CATALOG . DIR_WS_EDITORS)) {
$messageStack->add(ERROR_EDITORS_FOLDER_NOT_FOUND, ‘caution’);
}
OK 后台警告提示解决

到此,编辑器添加完成

This entry was posted in ZEN CART技术问题. Bookmark the permalink.