Search code examples
fuelphpfuelphp-routing

Route to public directory fuelphp


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?


Solution

  • 'myroute' => function () { return file_get_contents(DOCROOT.'assets/html/pages/mypage.html'); }