本地主机当前无法处理此请求.编码点火器问题



当我尝试从 wamp 访问网站时,我遇到了此错误,它是在代码点火器中完成的。

错误:

localhost is currently unable to handle this request. HTTP ERROR 500

主页索引控制器

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class HomeIndex extends CI_Controller {
    public function __construct(){
        parent:: __construct();
        $this->load->helper('html');
        $this->load->helper('form','url','file');
        $this->load->library('session','upload');
    }
    public function index()
    {   
        //$this->load->view('coming_soon');
        $this->load->view('homeIndex');
    }
}

路线

$route['default_controller'] = 'HomeIndex';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

我能够访问其他未使用任何框架完成的网站。

本网站是使用代码点火器完成的。我无法访问该网站。

谁能告诉我问题出在哪里?

使用数组通过一次调用完成多个加载:

$this->load->helper(array('form','url','file'));
$this->load->library(array('session','upload'));

https://www.codeigniter.com/user_guide/libraries/loader.html#CI_Loader::helper

如果这不起作用,请打开错误报告(在index.php中切换到开发模式(,然后查看实际错误是什么。 500 错误可以是很多事情...

最新更新