How does toroPHP set a 404 page?

Source: Internet
Author: User
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 ");

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.