I am building an app in fuelphp, and I'd like to route to a page of fully static content. For example, I have a file I'd like to display in public/assets/html/pages/mypage.html
, but i'd like to see that static content when I navigate to localhost/myroute
.
How can I write a route that does this?
'myroute' => function () { return file_get_contents(DOCROOT.'assets/html/pages/mypage.html'); }
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.