A question about cakephp path printing-php Tutorial

Source: Internet
Author: User
Tags blank page
Ask a cakephp path ing question. my routes file has the following configuration Router: connect (tf *, array (controller & gt; tf); Router: connect (demo, array (controller & gt; trees); when I access: localhostdemo, I can ask a cakephp path printing problem.
My
The following configurations are available for the routes file:
Router: connect ('/tf/*', array ('controller' => 'tf '));


Router: connect ('/demo', array ('controller' => 'trees '));

My access:
Http: // localhost/demo
Can be displayed normally


Access

Http: // localhost/tf/load? Userid = 1

A blank page appears

Open source code
Only





For example ~






While tf_controller.php
This PHP already exists ~
The code in should be correct.
Load is
Function load ($ userid, $ centerId = null, $ errorMsg = null)
Such definition

The beforeFilter () method has been annotated, and even if the annotation is canceled, it is still a blank page.
The content in beforeFilter is echo" ";



And no matter whether I access
Http: // localhost/tf /*

As long as it is under tf, it is all blank pages










Is it my configuration problem?
Or is there a conflict with the configuration file?
Or why?
Please tell me the solution... thank you

------ Solution --------------------
Router: connect ('/tf/*', array ('controller' => 'tf '));
Why do you know what you want to do if you didn't fill in your action?
------ Solution --------------------
$ Route-> connect ('/tf/', array ('controller' => 'posts', 'Action' => 'index '));
------ Solution --------------------
I have successfully tested it on the local machine. you can also try it.

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.