Xxx. phtml file and aaacontroller. the xxxaction () method in the PHP file seems to be bound. Is there such a possibility? xxx. in phtml, the form action can specify aaacontroller. the execution of the function specified in PHP, because xxxaction () will follow XXX. phtml is loaded and executed, which cannot be controlled. Return to the homepage of the IT Website>
-
-------- Solution --------
-
You are dizzy .. AAA/xxx of aaacontroller xxxaction or something will display XXX. phtml In the AAA folder by default
If you use render ('zzz'), it will display zzz. phtml. AAA/XXX, which is equivalent to a simple PHP class aaacontroller.
You can write a lot of action frameworks and it feels more orderly to develop them .. I have just been in touch with PHP (for more than two months). They are all used while watching...
-
-------- Solution --------
-
Directly write the method in the controller, and receive the post or get data processing submitted by the form.
-
-------- Solution --------
-
Thanks to the two upstairs. To be honest, I am also a little dizzy. Just simplify the problem. In. there is a form in phtml. Action = is followed by the Action Function in the specified controller.
-
-------- Solution --------
-
In fact, when zendframwork is created in zendstudio, an indexcontroller will be created under application-> controller. PHP file, which corresponds to an index under View> scripts> index. phtml file, right. the phtml content is changed to a form, and the Action path is not written (it should be handled by PHP on this page). Is there any way to make this form composed of indexcontroller. execution of a specified action function in PHP, indexcontroller. the two functions INI () and indexaction () in PHP will be executed even if no form is submitted.
-
-------- Solution --------
-
Action = "/indexcontroller/Up" indicates the Controller name and method name.
-
-------- Solution --------
-
Which page will the form go to after submission?
-
-------- Solution --------
-
For example, if you have a myaction in testcontroller, you will find the my. phtml page in the test folder in your views folder.
I haven't played ZF for a long time. I remember writing it like this. You can use $ this-> baseurl () in phtml to obtain the root directory.
Actions can be written in this way. Action = "<? PHP echo $ this-> baseurl ()?> /Test/my ". This means to call myaction in testcontroller, that is, find my in the test folder in the Views folder. phtml page (of course, this is the default situation, and there is only one module, if there are multiple modules or you have set the call non-default page in the action ).
-
-------- Solution --------
-
Thank you, a82168506. You have already solved this problem. After trying it out, you can find out the entire process. Thank you very much for your guidance!
-
The article comes from the IT field
Xxx. phtml file and aaacontroller. the xxxaction () method in the PHP file seems to be bound. Is there such a possibility? xxx. in phtml, the form action can specify aaacontroller. the execution of the function specified in PHP, because xxxaction () will follow XXX. phtml is loaded and executed, which cannot be controlled. Return to the homepage of the IT Website>
-
-------- Solution --------
-
You are dizzy .. AAA/xxx of aaacontroller xxxaction or something will display XXX. phtml In the AAA folder by default
If you use render ('zzz'), it will display zzz. phtml. AAA/XXX, which is equivalent to a simple PHP class aaacontroller.
You can write a lot of action frameworks and it feels more orderly to develop them .. I have just been in touch with PHP (for more than two months). They are all used while watching...
-
-------- Solution --------
-
Directly write the method in the controller, and receive the post or get data processing submitted by the form.
-
-------- Solution --------
-
Thanks to the two upstairs. To be honest, I am also a little dizzy. Just simplify the problem. In. there is a form in phtml. Action = is followed by the Action Function in the specified controller.
-
-------- Solution --------
-
In fact, when zendframwork is created in zendstudio, an indexcontroller will be created under application-> controller. PHP file, which corresponds to an index under View> scripts> index. phtml file, right. the phtml content is changed to a form, and the Action path is not written (it should be handled by PHP on this page). Is there any way to make this form composed of indexcontroller. execution of a specified action function in PHP, indexcontroller. the two functions INI () and indexaction () in PHP will be executed even if no form is submitted.
-
-------- Solution --------
-
Action = "/indexcontroller/Up" indicates the Controller name and method name.
-
-------- Solution --------
-
Which page will the form go to after submission?
-
-------- Solution --------
-
For example, if you have a myaction in testcontroller, you will find the my. phtml page in the test folder in your views folder.
I haven't played ZF for a long time. I remember writing it like this. You can use $ this-> baseurl () in phtml to obtain the root directory.
Actions can be written in this way. Action = "<? PHP echo $ this-> baseurl ()?> /Test/my ". This means to call myaction in testcontroller, that is, find my in the test folder in the Views folder. phtml page (of course, this is the default situation, and there is only one module, if there are multiple modules or you have set the call non-default page in the action ).
-
-------- Solution --------
-
Thank you, a82168506. You have already solved this problem. After trying it out, you can find out the entire process. Thank you very much for your guidance!
-
Article source from it http://www.itjie.wang/phpframework/443107.html
Cainiao asks zendframwork for simple guidance