EllisLab text mark
Advanced Search
     
Recovery parameters for url
Posted: 21 October 2011 04:23 AM   [ Ignore ]
Joined: 2011-10-21
1 posts

Greetings.

CodIgniter I just had begin with codeigniter.

In the view I have a link as follows:

anchor (‘videostore/movie/1 ...)
All in localhost.

When I push the link goes to: localhost/work/index.php/videostore/movie/1
All right.

But when I collect parameters;

If I put:

$ value1 = $ this-> uri-> rsegment (1), I get nothing
$ value2 = $ this-> uri-> rsegment (2), I get index
$ value3 = $ this-> uri-> rsegment (3), I get nothing
$ value3 = $ this-> uri-> rsegment (3), I get videostore

$value…. Everything else is empty

If I put:
echo $ this-> uri-> total_rsegments ();

I get only 2. And the rest does not appear and I’m interested in collecting movie and 1.

 
Posted: 21 October 2011 12:12 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2011-03-08
417 posts

Take a look at “Removing the index.php file” in the User Guide:

http://ellislab.com/codeigniter/user-guide/general/urls.html
 
 

 Signature 

Ongoing project:
  http://johns-jokes.com/joke-of-the-day/2010/May.html
My Hippy Trail:
  http://the-road-to-kathmandu.johns-jokes.com/
In case you forget:
  http://deformedweb.co.uk/php_variable_tests.php