bug反馈:windows server中str_replace(WP_CONTENT_DIR, \'\', $current_page_file)错误
./core/admin/options.php
第36到39行:
global $current_page_file;
if($current_page_file){
echo '[input type="hidden" name="current_page_file" value="'.str_replace(WP_CONTENT_DIR, '', $current_page_file).'" /]';
}
(由于尖括号会被过滤掉,故上述代码中的尖括号改为方括号)
其中的“str_replace(WP_CONTENT_DIR, \'\', $current_page_file)”在windows
server中不能成功将WP_CONTENT_DIR替换为空,会导致相关include脚本的时候报错。
因为在windows中,路径中的斜杠是反的,生成字符串的时候会自动加转义符:
WP_CONTENT_DIR的值为“D:wwwhomeXXX/wp-content”,而$current_page_file中的值为“D:wwwhomeXXXwp-contentpluginswpjam-basic/admin/pages/wpjam-topics.php”。
请作者修复,再次感谢作者提供这么好的免费插件