How to add Html file into cakephp App?
I have a html file and want to add it into cakephp App, 开发者_如何学GoI know that I can add css and image files into the Webroot folder, and rewrite the postfix of .html to .ctp, but how to use it in my cakephp app ,just like I can visit it just like http://localhost/users/login in IE?
You can place it directly in your app/webroot/ folder. It will be accessible at the URL http://localhost/filename.html
.
Let's assume your HTML file is called myfile.html.
Copy myfile.html to app/views/pages/myfile.ctp
You will now be able to view the page at http://localhost/pages/myfile
See the documentation for the Pages controller.
The home page you see after installation is generated using this controller.
精彩评论