|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-01-13 15:38 UTC] sterling@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 13:00:01 2025 UTC |
I planned to use the following function testing for a flag file 'offline_message.txt' to disable my application and contain an offline message. function isOffLine() { global $OffLineMessage; $OffLineMessage = "" ; $OffLineFilename = "offline_message.txt" ; if (!($fp = fopen($OffLineFilename, "r"))) { return false; } else { $OffLineMessage = file( $OffLineFilename ) ; return true; } } However bothe the fopen & file functions generates an unexpected and unwanted warning messages to the output stream. Warning: fopen("offline_message.txt", "r") - No such file or directory in /var/www/html/webmail/common.php on line 104 Warning: file("offline_message.txt") - No such file or directory in /var/www/html/webmail/common.php on line 105