SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Custom php error pages?

    I'm wondering if it's possible to create custom error pages, i want to release a script and would like nice error pages, it's not essential just looks more polished.

    for example WordPress uses wp_die() with it's code which re-directed you to a nice page if the error is thrown, instead of a blank white page with the error.

    CodeIgniter has nice error pages and even lets you modify them.

    Is it worth the hassle? i haven't been able to work it out yet.

  2. #2
    SitePoint Guru bronze trophy TomB's Avatar
    Join Date
    Oct 2005
    Location
    Milton Keynes, UK
    Posts
    996
    Mentioned
    9 Post(s)
    Tagged
    2 Thread(s)
    What kind of errors are you trying to replace? HTTP errors e.g. 404 not found? Or exceptions in code.

    Both are easy to do but they also have some caveats. The main one is that you need to make sure you return a relevant HTTP status code.

  3. #3
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    both if possible, i'd like customisable error pages across the board..


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •