This example describes the usage of quick variables in the Symfony template. Share it with you for your reference. The details are as follows: Some symfony variables can be directly used in the template. Through these shortcut variables, you can obtain some of the most common template information from the symfony object: $ sf_context: complete environment object (sfContext class instance) $ sf_reques
This example describes the usage of quick variables in the Symfony template. Share it with you for your reference. The details are as follows: Some symfony variables can be directly used in the template. Through these shortcut variables, you can obtain some of the most common template information from the symfony object: $ sf_context: complete environment object (sfContext class instance) $ sf_reques
This example describes the usage of quick variables in the Symfony template. We will share this with you for your reference. The details are as follows:
Some symfony variables can be directly used in the template. Using these shortcut variables, you can obtain some of the most common template information from the symfony object:
$ Sf_context: complete environment object (sfContext class instance)
$ Sf_request: request object (sfRequest class instance)
$ Sf_params: Request Parameter
$ Sf_user: current user session object (sfUser class instance)
Three common usage methods:
// 1. Long version <? Php echo $ sf_request-> getParameter ('Total')?> // 2. segment version <? Php echo $ sf_params-> get ('Total')?> // 3. Execute the following code echo $ request-> getParameter ('Total') in the action ')
I hope this article will help you design PHP programs based on the Symfony framework.