Hello everyone, I encountered some problems when using toroPHP routing. Currently, the 404 page mounted to toroPHP is: {code ...} problem: 1. I want to customize the 404 page to be consistent with the template on my site. That is to say, how can I use this function to specify the template on my page? 2. How can I find it in the user? Dear all, I encountered some problems when using toroPHP routing.
Currently, toroPHP mounts the following 404 page:
ToroHook: add ("404", function () {echo "Not found ";});
The problem is:
1. I want to customize the 404 page to be consistent with the template on my site. That is to say, how can I use this function to specify the template on my page?
2. How can I guide the user into the 404 page when the user cannot find the information?
Thank you.
ToroPHP GITHUB: Link Description
Reply content:
Hello everyone, I encountered some problems when using toroPHP routing.
Currently, toroPHP mounts the following 404 page:
ToroHook: add ("404", function () {echo "Not found ";});
The problem is:
1. I want to customize the 404 page to be consistent with the template on my site. That is to say, how can I use this function to specify the template on my page?
2. How can I guide the user into the 404 page when the user cannot find the information?
Thank you.
ToroPHP GITHUB: Link Description
Send a header in the hook and redirect to the 404 page.
Header ("Location:/404.html ");