php controller does not exist?
thinkphp controller does not exist?
Written a client request interface, opened it in the local browser, and reported an error that the controller cannot be found
The controller exists, check it out, The class name is consistent with the file name, and there is no problem with the namespace. Why can't it be found?
Look carefully at the error message. My controller is named LoginGame. It says that Logingame cannot be found. I entered it in the browser. It was uppercase, but it became lowercase. Oh, it turns out that the URL is not case-sensitive. If the controller changes it to lowercase, it can be accessed normally.
But it does not comply with the naming convention, and it is unbearable to look at. After checking it, I found out that the access address under windows should be written like this:
http://localhost/my-site/public/weigame/login_game
For more PHP related knowledge, please visit PHP中文网!
The above is the detailed content of php controller does not exist. For more information, please follow other related articles on the PHP Chinese website!