|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-09-10 16:31 UTC] llevier at argosnet dot com
Whatever you do (file, fgets, fgetss, ...) reading a line looking like a tag (eg VirtualHost, Directory, ... in Apache)
<VirtualHost name>
will make fgets mask the "tag".
So all between < & > will be lost...
Looks more like a bug than a feature...
To reproduce ?
$fd=fopen("Apache httpd.conf file","r");
while (!feof($fd))
{
$line=fgets($fd,1000);
print("Line=\"$line\"<BR>\n");
}
fclose($fd);
print("Where are the <text> fields ? :)\n");
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 10:00:01 2025 UTC |
Can you try this script and see what result you get? <?php $fd = fopen("/usr/local/apache/conf/httpd.conf","r"); while (!feof($fd)) { $line = htmlspecialchars(fgets($fd,1000)); print($line); } fclose($fd); print("Where are the <text> fields ? :)\n"); ?>