Re: Reading files in PHP 5.3.0

From: Date: Fri, 11 Sep 2009 14:08:09 +0000
Subject: Re: Reading files in PHP 5.3.0
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-297902@lists.php.net to get a copy of this message
>> function parseResponseHeaders($header_file) { >>     $http_found = $error_found = false; >>     $http_reponse = $error_message = NULL; >> >>     $response = array(); >>     $response['ResponseCode'] = NULL; >>     $response['ErrorMessage'] = NULL; >> >>     if (!is_file($header_file) || >> !is_readable($header_file)) { >>         return $response; >>     } >> >>     $fin = fopen($header_file, 'r'); >>     while ($line = fgets($fin)) { >>         var_dump($line); >> > What does var_dump($line); tell you? Nothing, not even an empty variable. Which is why I think something is completely screwed up here. BTW, squares at the end of lines are your platform not interpreting EOL characters correctly from another platform. Generally, its the sending client thats not being friendly, not the receiving client.

« previous php.general (#297902) next »