base url = 'http://localhost/site/'
URL http://localhost/site/controller/method
$this->uri->segment(1) = 'controller' $this->uri->segment(2) = 'method'
Now check also the example below
base url = 'http://testsite/test/site/'
URL http://testsite/test/site/controller/method
$this->uri->segment(1) = 'controller' $this->uri->segment(2) = 'method'
Send your message
http://testsite/test/site/controller/method/meesage
and use $this->uri->segment(3)
You can use a session and instead pass the message through the URL ..
source share