Fatal error: Call to undefined function validation_errors() in
Here is the code:
class CCI extends Controller {
func开发者_Python百科tion CCI()
{
parent::Controller();
}
function index()
{
$this->load->helper('url');
$this->load->view('Users/login');
}
function test()
{
echo "Testing Data";
}
}
The page was loading fine until I moved the location of the "login" page inside of the "Users" folder
Well then probably change
$this->load->view('Users/login');
to
$this->load->view('login');
Since you moved the file inside the Users folder you need to adjust paths for that.
You're properly displaying any validation errors within your view using the 'validation_errors' function that's located in the 'form_helper'. Load the 'form_helper' as well and you should be fine.
Add following two lines of code to the controller:
$this->load->helper('form');
$this->load->library('form_validation');
精彩评论