Results 1 to 4 of 4

Thread: suppress warnings [Resolved]

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    suppress warnings [Resolved]

    I want to stop warnings from being printed to the screen. Like when my DB is shutdown, I want it to only say what is in my "die" portion of my code instead of saying everything in the warning.

    I want this:
    Code:
    Warning: mssql_connect(): Unable to connect to server: xxx.xxx.xxx.xxx in C:\Program Files\Apache Group\Apache2\htdocs\conn.php on line 17
    Couldn't connect to SQL Server on xxx.xxx.xxx.xxx
    to become:
    Code:
    Couldn't connect to SQL Server on xxx.xxx.xxx.xxx
    (removed servername for obvious reasons)

    How do I do that?
    Last edited by ober0330; Jan 23rd, 2004 at 11:10 AM.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    use

    PHP Code:
    @function(params) or die("Error!"); 
    Like Archer? Check out some Sterling Archer quotes.

  3. #3

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    I'm using:
    PHP Code:
    $s = @mssql_connect($myServer$myUser$myPass
    or die(
    "Couldn't connect to SQL Server on $myServer"); 
    And it still throws the warning.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  4. #4

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Nevermind. I was editing the wrong file.

    Thanks
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

Posting Permissions

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



Click Here to Expand Forum to Full Width