0

In my codeigniter code there is a php controller Product.

<?php      
  class Product extends CI_Controller      
  {          
    function index($product_id)          
    { 
        ......
       ....
    }
  }

what is the link of this function. I try localhost/demo/product/index/2 here 2 is product_id,demo is project_name . But this link does not work?

user2571862
  • 41
  • 1
  • 2
  • 7
  • 1
    try with `localhost/demo/index.php/product/index/2` – Kumar V Jan 20 '14 at 12:46
  • 2
    Do you have a custom htaccess that removes 'index.php' from the url? If not, please see this question: http://stackoverflow.com/questions/1445385/how-to-remove-index-php-in-codeigniters-path – Mysteryos Jan 20 '14 at 12:46
  • 1
    Either ask a clearer question with more info, or go over the CI docs and figure it out yourself... The only answer I can give you is: Yes, it does work. – Shomz Jan 20 '14 at 12:47
  • give some more info on weather you got a -htaccess file to remove index.php from the url. Do other urls using codeigniter work? – nozzleman Jan 20 '14 at 13:17

0 Answers0