【发布时间】:2012-10-21 10:06:16
【问题描述】:
我继承了一个 CI v2.0.2 项目。
出于开发目的,项目已移至另一个子域,database.php 文件已正确重新配置。
登录页面加载正常。但是,在尝试登录后,我收到来自 CI 的错误消息:
An Error Was Encountered
Unable to load the requested class: encrypt
在 autoload.php 中,database 和 session 库是自动加载的。该文件与主代码库中的文件相同。
如果我在上面的行中添加encrypt 库,我根本看不到登录页面。
以下是日志文件,来自加载登录页面 -
DEBUG - 2012-10-21 04:15:22 --> Config Class Initialized
DEBUG - 2012-10-21 04:15:22 --> Hooks Class Initialized
DEBUG - 2012-10-21 04:15:22 --> Utf8 Class Initialized
DEBUG - 2012-10-21 04:15:22 --> UTF-8 Support Enabled
DEBUG - 2012-10-21 04:15:22 --> URI Class Initialized
DEBUG - 2012-10-21 04:15:22 --> Router Class Initialized
DEBUG - 2012-10-21 04:15:22 --> Output Class Initialized
DEBUG - 2012-10-21 04:15:22 --> Security Class Initialized
DEBUG - 2012-10-21 04:15:22 --> Input Class Initialized
DEBUG - 2012-10-21 04:15:22 --> XSS Filtering completed
DEBUG - 2012-10-21 04:15:22 --> XSS Filtering completed
DEBUG - 2012-10-21 04:15:22 --> XSS Filtering completed
DEBUG - 2012-10-21 04:15:22 --> Global POST and COOKIE data sanitized
DEBUG - 2012-10-21 04:15:22 --> Language Class Initialized
DEBUG - 2012-10-21 04:15:22 --> Loader Class Initialized
DEBUG - 2012-10-21 04:15:22 --> Helper loaded: url_helper
DEBUG - 2012-10-21 04:15:22 --> Database Driver Class Initialized
DEBUG - 2012-10-21 04:15:23 --> Session Class Initialized
DEBUG - 2012-10-21 04:15:23 --> Helper loaded: string_helper
DEBUG - 2012-10-21 04:15:23 --> Session routines successfully run
DEBUG - 2012-10-21 04:15:23 --> Controller Class Initialized
ERROR - 2012-10-21 04:15:23 --> Unable to load the requested class: encrypt
从原始域使用登录时可以正常工作。
我应该从哪里开始寻找任何指针?
【问题讨论】:
-
@GBD:日志也以
Unable to load the requested class - encrypt结尾。用日志更新了上面的问题。 -
你能检查加密库的文件名到新域的目录吗?
-
@GBD:非常感谢您在这里引起我的注意。
encrypt库不在system/libraries文件夹中。谢谢。如果您发布,我可以将您标记为选定的答案。
标签: php codeigniter autoload