I am trying to deploy my application in heroku with codeigniter, I have a series of errors that I have been solving, but I would like to know the correct way to configure the framework codeigniter to be able to deploy it in heroku, the database is configured and I have no problems with your connection.
At this point I have problems with loading the helper.
Problem 1: My helper located in the corresponding folder "helpers" and its name is cargarConsultas_helper:
<?php
if(!defined('BASEPATH')) exit('No direct script access allowed');
function getAreas()
{
$ci =& get_instance();
$query= $ci->db->get('areas');
return $query->result();
}
?>
my controller in which I charge the helper:
public function __construct()
{
parent::__construct();
$this->load->helper(array('url', 'cargarConsulta'));
}
the error that throws me is:
I thank you for your help.
Try to rename your helper where the first letter only is upper case same applies for controllers and models and libraries etc
Filename Cargarconsultas_helper:
$this->load->helper(array('url', 'cargarconsulta'));
Class and filenaming guide
https://www.codeigniter.com/user_guide/general/styleguide.html#file-naming
替换$this->loaa->helper('cargarConsultas')
错误是因为在filename
cargarConsultas
中, C
是大写cargarConsultas
,在helper中,您写了c
小,因此无法加载该文件
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.