Brandon Jake Sullano Brandon Jake Sullano - 1 month ago 4x
PHP Question

PHP CI load .html file

Hi Is there a way to load .html file in a Codeigniter framework?

say example

public function saveimage(){

but it says
"unable to load requested file"

is there any settings I need to change?

Appreciate your help

Here is the screen shot of my code and the error

My CI code and folder
enter image description here

Error page

enter image description here


CI can loade html file without any extra configs, please ensure that place the html file in views's folder, and the file's name is the same as what you pass into $this->load->view() method.

Check this documentation and find out does there have any mistakes in your project which are violate CI's view arrangement.


According to the screen shot you posted on, I find your html file's extension is htm not html, So either change file's extension to html or pass the right file name with the right extension into method $this->load->view();