CakePHP plugin throws “Missing View” error but view file exits

后端 未结 2 1763
暖寄归人
暖寄归人 2020-12-22 07:53

I\'m writing a basic plugin for my cakePHP 2.x app following the instructions in the book.

I\'ve created the directory/file structure with a MyPluginAppController.ph

2条回答
  •  暖寄归人
    2020-12-22 08:48

    Rename this file

    app/Plugin/MyPlugin/View/MyModel/admin_index.php
    

    To this extension .ctp

    app/Plugin/MyPlugin/View/MyModel/admin_index.ctp
    

    This is a common mistake.

提交回复
热议问题