Welcome Guest, Not a member yet? Register   Sign In
Why does uri->segment(); not work with me?
#11

[eluser]xwero[/eluser]
what is your base url in config.php?
#12

[eluser]sungamer[/eluser]
It is $config['base_url'] = "http://127.0.0.1/"; Uri Protocol is AUTO.
#13

[eluser]metaltapimenye[/eluser]
i've tried it..
Code:
<?php
class test extends Controller {

    function test()
    {
        parent::Controller();
    }

    function index()
    {
        echo "ID=";
        echo $this->uri->segment(3);


    }
}

?>

url:
Code:
http://127.0.0.1/index.php/test/index/1
and results..
Code:
ID=1

are you sure u have no additional pointer at config/routes.php?
#14

[eluser]sungamer[/eluser]
I've copied your code, but it doesn't work. My installation is ip to date. Now I am going to reinstall CI and test it.
#15

[eluser]sungamer[/eluser]
Crazy... I've overwrite all the system files and it works! But I doesn't know where the problem was...




Theme © iAndrew 2016 - Forum software by © MyBB