baig772
baig772

Reputation: 3488

Controller not found in directories

i downloaded a project from my dev to local, it was almost done, i have to correct some issues in it. As i am new to Code Igniter, i cannot figure out where is the controller file located?

http://localhost/ric/view/store/3 is my URL and by looking to URL, the controller name should be "view" and function is "store" but in my controller directory, there is no file named like this. Can any body help me with this? the complete routing is this

$route['default_controller'] = "site";
$route['scaffolding_trigger'] = "";

$route['classifieds'] = "site/classifieds";
$route['specials'] = "site/specials";
$route['hot'] = "site/hot";
$route['joinus'] = "site/joinus";
$route['faq'] = "site/faq";

$route['browse'] = "product/browse";
$route['browse/:any'] = "product/browse/$1";
$route['stcat/:any'] = "store/browse/$1";
$route['search/:any'] = "product/search/$1";
$route['searchstore/:any'] = "store/search/$1";


$route['view/product/:num'] = "product/getOne/$1";

$route['view/store/:num'] = "store/getOne/$1";

$route['view/article/:any'] = "article/get/$1";

Upvotes: 1

Views: 62

Answers (1)

Jelmer
Jelmer

Reputation: 2693

I think you are making use of a .htaccess file and a rewriteRule? Add a rewriteBase, trial-and-error is the best approach since I don't know how your structure looks like.

Please provide us with more information and a more detailed post so we can help you better.

update after reading your question again

after re-reading your question. Are you saying that you can't find the viewcontroller? Have a look at your routing. I guess that View is a routing to another controller. Because most of the times the ViewController is not used. Mostly it is called PlaneController, StoreController or UserController which has a view action, and not a ViewController that has a store action. I hope this helps.

update 2 after seeing your update where you added the routing file.

    $route['view/store/:num'] = "store/getOne/$1";

Like I thought, you should try and find the StoreController with the getOne action. Good luck.

Upvotes: 2

Related Questions