Php 如何从控制器中的URL访问参数值?
我需要一些关于phalcon框架中参数传递的信息 示例URL:Php 如何从控制器中的URL访问参数值?,php,phalcon,url-parameters,Php,Phalcon,Url Parameters,我需要一些关于phalcon框架中参数传递的信息 示例URL:http://localhost/project/vehicle/new/vinno/1323123 vehicleController{ newAction { //get the value of vinno // want to send parameter to view } } 尝试转储调度程序参数 print_r($this->dispatcher->getP
http://localhost/project/vehicle/new/vinno/1323123
vehicleController{
newAction {
//get the value of vinno
// want to send parameter to view
}
}
尝试转储调度程序参数
print_r($this->dispatcher->getParams());
以上内容将根据路由器定义为您提供完整的参数数组。有关调度程序的详细信息,请参见
要获取特定的参数值,可以使用getParam()
方法
print_r($this->dispatcher->getParam('your_param_name'));
尝试转储调度程序参数
print_r($this->dispatcher->getParams());
以上内容将根据路由器定义为您提供完整的参数数组。有关调度程序的详细信息,请参见
要获取特定的参数值,可以使用getParam()
方法
print_r($this->dispatcher->getParam('your_param_name'));
使用路由参数。并使用
$this->view->setVar
使用路由参数。然后使用$this->view->setVar
我们可以提及参数名称来获取其值吗?我们可以提及参数名称来获取其值吗。?