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.