SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot daemon's Avatar
    Join Date
    Apr 2001
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How can I tell php to fail quiet? i.e. not to display the
    php error message (for example when connecting to an unreachable MySQL db?) but display my own error msg?

  2. #2
    Not Bad, eh? Justin Sampson's Avatar
    Join Date
    Aug 2000
    Location
    N.S., Canada
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You use the "@" sign like this:

    PHP Code:
    //Cannot find DB
    if(! @mysql_select_db("$db_Database") ) {
    echo (
    "<p>Unable to locate the database at this time. We are very sorry for any inconvenience, please try agian later.</p>");
    exit();


  3. #3
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or use the error reporting level:
    http://www.php.net/manual/en/functio...-reporting.php
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy


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
  •