~ Some questions about cakephp, high score!

Source: Internet
Author: User
~~~ Some questions about cakephp, high score for help !! I was just reading cakephp and now I have encountered some problems. 1. I want to know that if the access to the console at http://www.yuming.com/is abnormal, I have searched for a long time and cannot find it. 2. now I have written a home (model), homecontroller, and home (view). It runs successfully, ~~~ Some questions about cakephp, high score for help !!
I was just reading cakephp and now I have encountered some problems.
1. I want to know that if the access to the console at http://www.yuming.com/is abnormal, I have searched for a long time and cannot find it.
2. now I have written a home (model), homecontroller, home (view), and successfully run it, however, my content is only displayed in the div id = "content" in an html object. I did not write the above html header information. Automatically called by cake. Can I block it?

------ Solution --------------------
The default homepage of cake is APP/views/pages/home. in addition, you can use the default layout file APP/views/layouts/default. ctp control.


------ Solution --------------------
Set $ layout in your controller to block default. ctp.
You can set it to null or your own template.



------ Solution --------------------
There is a routes. php under the config Directory, that is, the route settings
Router: connect ('/', array ('controller' => 'pages', 'Action' => 'display', 'home '));

The default value is home,
Here you can change to your own controller and action
------ Solution --------------------
Now the instruction in cakephp1.3 is detailed. we recommend that you read it carefully from the beginning.
------ Solution --------------------
The default controller of cakephp is PagesController. The corresponding model is Page, and the database table name is pages. The view file is stored in views \ pages \ home. ctp. This is the default controller called by cakephp.
The master page you mentioned is under the lib of cake by default, but it is best not to change it. You should redefine it in views \ layouts \ defualt. ctp.
This is probably the case. I wish the landlord an early success ~ Points !!
------ Solution --------------------
The default files in cakephp are in cake/libs/view/layouts/default. ctp.
Just write it. Not very difficult ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.