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'); I access: http: Ask a cakephp path printing question
My
The following configurations are available for the routes file:
Router: connect ('/tf/*', array ('controller' => 'tf '));
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.
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.