通过MVC框架中的URL传递多个参数

I'm trying to pass multiple parameters in a url that looks like this...

http://somedomain.com/lessons/lessondetails/5/3

... to a function in the controller that looks like this ...

class LessonsController extends Controller

{
public function lessonDetails($studentId, $editRow=NULL)
{
    try {
        $studentData = new StudentsModel();
        $student = $studentData->getStudentById((int)$studentId);
        $lessons = $studentData->getLessonsByStudentId((int)$studentId);

        if ($lessons)
        {
            $this->_view->set('lessons', $lessons);

        } 
        else
        {
            $this->_view->set('noLessons', 'There are no lessons currently scheduled.');
        }
        $this->_view->set('title', $student['first_name']);
        $this->_view->set('student', $student);

        return $this->_view->output();

    } catch (Exception $e) {
        echo "Application error: " . $e->getMessage();
    }
}
}

But only the first parameter seems to pass successfully. Not sure what to copy and paste here but here's the bootstrap.php...

$controller = "students";
$action = "index";
$query = null;

if (isset($_GET['load']))
{
    $params = array();
    $params = explode("/", $_GET['load']);

    $controller = ucwords($params[0]);

    if (isset($params[1]) && !empty($params[1]))
    {
            $action = $params[1];
    }

    if (isset($params[2]) && !empty($params[2]))
    {
            $query = $params[2];
    }
}

$modelName = $controller;
$controller .= 'Controller';
$load = new $controller($modelName, $action);

if (method_exists($load, $action))
{
    $load->{$action}($query);
}
else
{
    die('Invalid method. Please check the URL.');
}

Thanks in advance!

Call $this->getRequest()->getParams() from your action controller and check if both parameters are there.

If NO, the problem lies with your routing.

If YES, the problem lies with passing the parameters to your controller method lessonDetails.

Also, lessondetailsAction is missing. (this will be the method called if you visit the url you posted)