url - CodeIgniter Controller Method Parameters Issue -


I am using codeigniter 2.1 and I am defining a function as follows.

  Public function reset ($ email, $ hash) {}   

MVC architecture and OOPS According to the concept, the function I parameters did not pass url . But this function is executed in the codinator, so how can I remove it? Please help me find a solution.

You just need to define such passive parametres:

  (name of the controller)     public function reset ($ email = null, $ hash = null) / reset From /mail@mail.com/dsadasda   

to $ email = mail@mail.com & amp; $ hash = dsadasda

If you want

  (name of the controller) / reset   

to < Code> $ email and $ hash will be empty.

In addition to this you can declare the default parameter like this.

  Public function reset ($ email = mail@mail.com, $ hash = dsadasdas) {}   

Hope I was clear.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -