开发者

Front-end phtml template form doesn't connect to controller.php file

The web system which I'm working on right now, has a add.phtml (in views folder) form, which contain normal form elements and pageController.php (in Controller folder) file which has function to be connected when user hit "add page" button o开发者_Go百科n the form. The codes goes like this.

on add.phtml file,

input type = "submit" value ="Add Page"

on pageController.php file,

function insertAction(){

}

For some reason these two doesn't connect now. Is anybody have any idea why this doesn't work or what should I check on this kind of a problem. The web system on zend framewok. I really appreciate if someone can help me.


Google for Zend beginning tutorials.

Essentially your pageController is looking for a phtml file in views/scripts/page (note page is the same name as the 'page' in pageController) directory and is expecting a phtml file insert.phtml, this file's root name corresponds to the action defined in the controller, see insertAction.

sic.

    class doodahController extends Zend_Controller{

public function campdownAction(){
}
//..more stuff
}


Directory structure
application
  controllers
    doodahController
  views
    scripts
      doodah
       campdown.phtml
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜