Reading files question

This is a discussion on Reading files question within the PHP General forums, part of the PHP Programming Forums category; I have a file that has the 130 lines which follows the example below. <Option Value="146"&...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-17-2003
Beauford.2005
 
Posts: n/a
Default Reading files question

I have a file that has the 130 lines which follows the example below.

<Option Value="146">Barnaby

What I need to do is read this file, remove one line, add another line,
and then resave it. I have tried the different fget functions etc. to
read the file, but all I get is the name part and nothing else. I am
assuming it has to do with the <,", or = in the line, so how would I
read in the entire line.

TIA

Reply With Quote
  #2 (permalink)  
Old 07-18-2003
Curt Zirzow
 
Posts: n/a
Default Re: [PHP] Reading files question

Beauford.2005 <beauford.2005@rogers.com> wrote:
> I have a file that has the 130 lines which follows the example below.
>
> <Option Value="146">Barnaby
>
> What I need to do is read this file, remove one line, add another line,
> and then resave it. I have tried the different fget functions etc. to
> read the file, but all I get is the name part and nothing else. I am
> assuming it has to do with the <,", or = in the line, so how would I
> read in the entire line.


hmm, are you printing the results of fgets to the browser? If you are
check the source, the browswer wont display the stuff between <>

or use htmlentities on the string before printing it.


Curt
--

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:59 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0