致命错误:找不到类“CI_Model” [英] Fatal Error: Class 'CI_Model' not found

查看:730
本文介绍了致命错误:找不到类“CI_Model”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

突然,我的网络服务器上的网页出现故障。

All of a sudden my pages on my web-server are failing. Everything works brilliantly locally.

有问题的错误

[Wed Sep 12 03: 37:49 2012] [error] [client _______] PHP致命错误:在/home/webuser/public_html/website.com/public/application/models/userModel.php在第2行中找不到类'CI_Model'

打开userModel.php的行

Opening lines of userModel.php

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Class UserModel extends CI_Model{

这一直工作直到今天,最近代码拉。

This has been working all up until today when I did a recent code pull. Which was only changes to views, controllers and this particular module.

推荐答案

显然无法找到类CI_Model,应该位于 system / core / Model.php 中。

It's obviously not being able to find the class CI_Model which should be in system/core/Model.php.

确保文件仍然存在,文件名由于某种原因没有更改,并且文件中没有拼写错误。

Make sure the file is still there and the filename hasn't changed for some reason, and that there is no typo within the file.

最后,在主要的index.php(驻留在应用程序系统目录),请确保 $ system_path 设置正确。

Finally, in the main index.php (the one that resides outside of application and system directories), make sure $system_path is set correctly.

这篇关于致命错误:找不到类“CI_Model”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆