Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do you disable warnings in PHP?

    hi all,
    im new to PHP and i was wondering how i go about disabling warnings in PHP? im using XAMPP with Dreamweaver MX. I was told something about doing it in the config?
    many thanks!

  • #2
    Regular Coder devinemke's Avatar
    Join Date
    Dec 2004
    Location
    NYC
    Posts
    443
    Thanks
    0
    Thanked 12 Times in 11 Posts
    Code:
    display_errors = Off
    ...in your php.ini file. i highly recommend that you don't do this on your development environment as this will nearly impossible to debug your code.

  • #3
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can also use:

    PHP Code:
    error_reporting(0); 
    at the top of your script.

    Personally, I think that if you are new to PHP then you should leave it on... I think everyone should leave it on except on their actual website server... Reason being, if PHP is generating warnings then something could/should be done to stop them happening.


  •  

    Posting Permissions

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