RE: [PHP] Fetching XML for parsing
| From: | Jason Sheets | Date: | Sun, 25 Apr 2004 20:09:25 +0000 |
| Subject: | RE: [PHP] Fetching XML for parsing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184586@lists.php.net to get a copy of this message | ||
rb is correct, b should be used to ensure portability between operating
systems with different line endings.
Quoted from http://us2.php.net/fopen
"For portability, it is strongly recommended that you always use the 'b'
flag when opening files with fopen()"
Jason
-----Original Message-----
From: Burhan Khalid [mailto:phplist@meidomus.com]
Sent: Sunday, April 25, 2004 4:51 AM
To: Patagonia Hosting Development Group; php-general@lists.php.net
Subject: Re: [PHP] Fetching XML for parsing
Patagonia Hosting Development Group wrote:
> That may be the exact problem. I was not figuring that one out. Thi is
> my fopen and XML parser code:
>
> $xml_parser = xml_parser_create();
> xml_set_element_handler($xml_parser, "startElement", "endElement");
> xml_set_character_data_handler($xml_parser, "characterData"); if
> (!($fp = fopen($uFile,"rb"))) {
Are you sure about rb? Shouldn't that just be r?
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php