joven 发表于 2011-8-11 15:01:02

require与require_once效率谁更高?CI中用的是前者

你好,有个问题想请教一下。
在system/core/Common.php文件中。
&load_class函数和&get_config函数里面在包含文件的时候为啥使用的是require而不是require_once,后者我想应该比前者效率更高一些吧。

请指教。

joven 发表于 2011-8-11 15:11:07

没人指教嘛。。。。。:L

jeongee 发表于 2011-8-11 16:23:31

本帖最后由 jeongee 于 2011-8-11 16:24 编辑

joven 发表于 2011-8-11 15:11 static/image/common/back.gif
没人指教嘛。。。。。
ci源代码的某处有这样一句注释,
include() vs include_once() allows for multiple views with the same name

虽然说的include,显然用在解释这个上面也是通的。

joven 发表于 2011-8-11 16:34:37

谢谢jeongee 版主,百度到了答案。

http://blog.csdn.net/lgg201/article/details/6184745

:P
页: [1]
查看完整版本: require与require_once效率谁更高?CI中用的是前者