|
Posted by Norman Peelman on 12/26/05 15:50
<taras.di@gmail.com> wrote in message
news:1135305139.967370.20370@g43g2000cwa.googlegroups.com...
> Hi everyone,
>
> I've got a weird problem. I'm trying to write to a file, when I open
> the file in 'at' mode, the contents are correct, like this:
>
> insert into distances set
> sourceSuburb = 'Port Augusta',
> sourceState = 'SA',
> destinationSuburb = 'Port Augusta',
> destinationSate = 'SA',
> distance = 0.0;
>
> insert into distances set
> sourceSuburb = 'Port Augusta',
> sourceState = 'SA',
> destinationSuburb = 'Kapunda',
> destinationSate = 'SA',
> distance = 267.17;
>
> However, when I open the file using 'wt' mode (the preferred mode),
> with *exactly* the same code, I get the following results:
>
> insert into distances set
> sourceSuburb = 'Port Augusta',
> sourceState = 'SA',
> destinationSuburb = 'Port Augusta',
> destinationSate = 'SA',
> distancinsert into distances set
> sourceSuburb = 'Port Augusta',
> sourceState = 'SA',
> destinationSuburb = 'Kapunda',
> destinationSate = 'SA',
> distance =insert into distances set
> sourceSuburb = 'Port Augusta',
> sourceState = 'SA',
> destinationSuburb = 'Adelaide',
> destinationSate = 'SA',
> distance =insert into distances set
> sourceSuburb = 'Port Augusta',
>
> which is nowhere near what it should be. Obviously I'm missing
> something here, what is it?
>
> I'm using Windows 2000 with PHP 5.
>
> TIA
>
> Taras
>
Show us the complete code snippet from the opening of the file to the
closing of the file...
Norm
--
FREE Avatar hosting at www.easyavatar.com
Navigation:
[Reply to this message]
|