使用 CodeIgniter,从控制器 (application/controllers/home.php) 观察以下行:
$this->load->library(array('account/authentication'))
AFAIK,这将:
- 从 application/modules/account/libraries/authentication.php 加载“authentication.php”
- 从 application/libraries/account/authentication.php 加载“authentication.php”
那么,如果两者都存在呢?实验中,CI 似乎在寻找第一个,如果不存在,它会加载第二个。这种行为是不是很奇怪??这两个文件可能彼此无关。
如果您指的是本地文件还是模块文件,是否没有一种明确声明的方法?