php - Supress-warnings

Yesterday i was working on PHP’s file handling functions. Due to default permissions i was getting default warnings generated by PHP Engine. I decided to suppress the warning messages. Found out a very simple solution for this problem.

Just need to put a @ before calling file handling functions.

$handle = @ fwrite(”abc.txt”, “w”);

After this warning messages were not rendered on the screen.

This entry was posted in PHP and tagged . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*