2011-04-04 11:02



I recently started working with CakePHP but there are a few things I don't understand...

What do I have to do to get an overview of a couple of functions/views on one page like ''. I really need help with this I am stuck in thinking in regular procedural php.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • donglang5157 donglang5157 10年前

    First off, you should follow the Blog tutorial on the CakePHP cook book :

    It's a great example and walks you through all the main stuff.

    CakePHP follows an MVC structure and maps the URLs to controller/actions (using routes)

    In your example, if you haven't changed the default routing, actually maps to the index method in your ProfileController. This method uses the view in /views/profiles/index.ctp to display output.

    First follow the tutorial and read up on the CookBook to figure out what all this means. It's very easy to learn and they have some good documentation. Also check out code generation in CakePHP. It helps you create your apps faster (if used properly).

    点赞 评论 复制链接分享
  • dtvpe4837413 dtvpe4837413 10年前

    You need to read the manual about Routing. Also be familiar with basic Apache knowledge like mod_rewrite.

    点赞 评论 复制链接分享