#21618 [Opn->Bgs]: fopen on no existing files generates unexpected output.

From: Date: Mon, 13 Jan 2003 21:38:36 +0000
Subject: #21618 [Opn->Bgs]: fopen on no existing files generates unexpected output.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-29902@lists.php.net to get a copy of this message
ID: 21618 Updated by: sterling@php.net Reported By: martin@kitv.co.uk -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: Apache on RedHat Linux PHP Version: 4.2.3 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2003-01-13 11:02:11] martin@kitv.co.uk 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21618&edit=1

« previous php.bugs (#29902) next »