Route to public directory fuelphp

102 Views Asked by At

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?

1

There are 1 best solutions below

1
kenjis On BEST ANSWER

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