Naveed Ul Islam
Naveed Ul Islam

Reputation: 85

404 Page Not Found The page you requested was not found while new page created codeigniter

I have copied Model, View, Controller files to new Model/Controller/View with different filename in a codeigniter project. When I access the new page the below error is occurring:

404 Page Not Found

The page you requested was not found.

Upvotes: 1

Views: 187

Answers (2)

Vickel
Vickel

Reputation: 7997

if you copy (save as) a controller or model, there are several reasons why a

404, page not found error

may occur:

  • the file was not saved with a capital first letter
  • the class name was not updated
  • the class name was updated, but doesn't start with a capital first letter
  • in case of controller: the routing was not updated/included

for example, if a model's filename is MyModel.php, it needs to start with class MyModel extends CI_Model {}

see General Topics Controllers and Models

Upvotes: 1

Naveed Ul Islam
Naveed Ul Islam

Reputation: 85

it works fine now, Class names were not updated it have been updated now.

Upvotes: 0

Related Questions