Re: note 8403 added to fgets

From: Date: Sun, 10 Sep 2000 20:34:26 +0000
Subject: Re: note 8403 added to fgets
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-4670@lists.php.net to get a copy of this message
llevier@argosnet.com writes: > Whatever you do (file, fgets, fgetss, ...) reading a line looking like a tag (eg Virtual Host > in Apache) > <VirtualHost name> > will make fgets mask the "tag". > So all between < & > will be lost... > > Looks more like a bug than a feature... > > > http://www.php.net/manual/function.fgets.php This may seem like a stupid question--but are you reading from the file and then outputting directly to a browser? If so, there is an excellent chance that the angle brackets are simply making your browser think that it's an HTML tag which the browser doesn't understand; since the browser doesn't understand it, nothing is output. Try wrapping the strings in htmlspecialchars() before you output, or using View Source, and see if you get the same result. Of course, if what you say is happening is really happening, it's a bug and should be reported to http://bugs.php.net. BTW, I've deleted your note; the errata notes system isn't the place for bug reports. Please make sure to read the instructions at http://www.php.net/manual/add-note.php before adding another note. Cheers, Torben -- +----------------------------------------------------------------+ |Torben Wilson <torben@php.net> Netmill iTech| |http://www.coastnet.com/~torben http://www.netmill.fi| |Ph: 1 250 383-9735 torben@netmill.fi| +----------------------------------------------------------------+

« previous php.notes (#4670) next »