1

Is it possible a controller inside a subfolder, lets call it 'category', extends from a controller from the parent folder?

Example:

  • application_controller.php in the controller folder
  • category in the folder controller/category

It keeps me showing the error

require_once(../application_controller.php) [function.require-once]: failed to open stream: No such file or directory

Is there some trick i'm missing to do that?

Thanks in advance
Elkas

Elkas
  • 603
  • 12
  • 27

1 Answers1

1

You're technically executing in a wierd scope because of how the controllers are loaded up.

require_once(APPPATH.'controllers/application_controller.php');

This is what you're looking for.

APPPATH will always point to your application/ folder.

Aren
  • 54,668
  • 9
  • 68
  • 101