Welcome Guest, Not a member yet? Register   Sign In
anyway to use this routes system
#1

[eluser]7amza[/eluser]
hello
i want to use this system of url :
Module?Select=ControllerName&View=MethodName&params1=value&params2=value
and from the controller if i want get the controller i can get the value like that :
$this->uri->segment('1'); // provides : Controller
or $_GET['Select'] ;
so i know to make routes but how to call them?
thanx
#2

[eluser]pickupman[/eluser]
That looks like a nightmare. There is a reason why the CI team has created the uri structure because it is cleaner. I don't seen reason where the same url couldn't be using the standard uri segments. What happens if a user alters one of variables like View=.
#3

[eluser]7amza[/eluser]
i need to know how can i do that ! not all what i ask about i need to do it ! but i have to know in order to improve my skills .
so can anyone tell me the method to do that?
#4

[eluser]danmontgomery[/eluser]
How would getting someone else to do it for you improve your skills?

You would have to mix segments and query strings to perform your own routing: http://www.askaboutphp.com/58/codeignite...rings.html
#5

[eluser]7amza[/eluser]
noctrum , none was burn learned! i have to ask in order to get the information there is a problem in what i did?
im sorry so if my topic made you mad ..
#6

[eluser]danmontgomery[/eluser]
No, not mad...

Try the link I pasted. Try some things yourself, come back and tell us what you've found. You'll get a lot more help with "I've tried this and it's not quite working" than "someone do this for me"
#7

[eluser]7amza[/eluser]
i will keep your advice believe me .. never i'll post a problem before i tried to solve it my self and do my efforts .
and now i did a test and it wasn't work with me the method you given me .
Code:
//config/config.php
$config['uri_protocol']    = "PATH_INFO";
$config['enable_query_strings'] = TRUE;
//config/routes.php
$route['Service?Select=(:any)'] = "Welcome/Index/$1";
//controllers/config.php
function Index(){
        $id = $this->uri->segment(2);
        echo $id;
    }
when i tried access to : http://localhost/project/Service?Select=1
i got the error : The page you requested was not found.




Theme © iAndrew 2016 - Forum software by © MyBB