Welcome Guest, Not a member yet? Register   Sign In
passing parameters to controller, please help!
#11

[eluser]Crawley[/eluser]
It didn't help
#12

[eluser]Crawley[/eluser]
[quote author="Dan Bowling" date="1241559435"]Can you paste in the entire controller?[/quote]

There's nothing else, only a constructor...
#13

[eluser]Crawley[/eluser]
Is there any other way of passing parameters in URL????
#14

[eluser]Crawley[/eluser]
Hmm... I guess my version of CI is so old that it doesn't support passing parameters via the URI. (I'm editing an older sample project) How was the parameter passing done in the older versions?
#15

[eluser]Dam1an[/eluser]
I doubt older versions of CI didn;t support parameters to controllers :S
You should have a copy of the userguide with it specific to that version

You can always use func_num_args() to get an array of parameters for a function
#16

[eluser]xwero[/eluser]
Passing the parameters is done in the codeigniter.php file.
Code:
call_user_func_array(array(&$CI, $method), array_slice($URI->rsegments, 2));
#17

[eluser]Crawley[/eluser]
Thanks a lot guys! I finally got it working by adding some lines of code in codeigniter.php and Router.php Big Grin

Maybe next time I should use the newest version of CI :S
#18

[eluser]Bl1nk[/eluser]
Ive been looking for a solution of this problem but I found this thread very the same with my problem. I installed new version of codeigniter 1.7.1 with xampp 1.7.2, I dont know if these are compatible.

When I tried this URL:

http://localhost/mostrag/index.php?/most...9156824269

It outputs an error of: Message: Missing argument 1, which I think that my code is correct.

My class looks like this:

class Mostrag extends Controller {

// ...

public function profile($id)
{
// ...
}
}


I hope you can suggest what’s happening in my xampp and codeigniter. Im doing this in Windows Vista.


Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB