简体   繁体   中英

How deploy in heroku codeigniter?

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:

error

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

https://www.codeigniter.com/user_guide/general/helpers.html

替换$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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM