Cakephp passing a parameter from index page -


is possible pass value variable in index page?

for example, "/app/user/1"

in controller, want this

public function index($id = null){ ... } 

in cakephp, give error , saying "error: action 1 not defined in controller"

that error because you're missing action part of url

try /app/users/index/1

note plural on controller part. $id passed action want that.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -