注释错误 或 代码有误

#1 xyhx

在3.1.66版本中的spFunction.php的import()函数中
第68行和第69行:
// 按“应用程序包含目录 -> 应用程序Model目录 -> sp框架包含文件目录”的顺序搜索文件

                        foreach(array_merge( $GLOBALS['G_SP']['sp_include_path'], array($GLOBALS['G_SP']['model_path']), $GLOBALS['G_SP']['include_path'] ) as $sp_include_path){

                       
个人愚见:实际代码的执行顺序为“sp框架包含文件目录-> 应用程序Model目录 -> 应用程序包含目录” 与文中注释相反。

2011-05-18 21:54:51

#2 jake

检查,是代码问题。本来array_merge是会从后到前覆盖,不过上面是数字索引,所以不会覆盖。
http://www.w3school.com.cn/php/func_array_merge.asp

已SVN修正

2011-05-18 22:54:03