![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | ||
|
King of Portal
|
I'd like to know why I'm getting the following error:
Quote:
PHP Syntax (Toggle Plain Text)
Quote:
PHP Syntax (Toggle Plain Text)
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
||
|
|
|
|
|
#2 |
|
Newbie
Join Date: Apr 2008
Posts: 16
Rep Power: 0
![]() |
Re: Strange fopen Problem
With the second code you tell it to do a write to the file
fwrite($h1, 'bar'); If you are trying to get it to add more text in to the file try: $h1=fopen($filename, 'a'); |
|
|
|
|
|
#3 |
|
King of Portal
|
Re: Strange fopen Problem
I'm not attempting to add more. I'm attempting to read that which has already been written.
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Apr 2008
Posts: 16
Rep Power: 0
![]() |
Re: Strange fopen Problem
then your code should be:
php Syntax (Toggle Plain Text)
|
|
|
|
|
|
#5 |
|
Expert Programmer
Join Date: Jun 2005
Posts: 824
Rep Power: 4
![]() |
Re: Strange fopen Problem
In the first one your are getting the file size before you open the file again, in the second you open the file for reading before you get the file size. I suspect there that the write isn't being flushed to disk until a different IO is performed, so the file's size on disk doesn't match what you think it does.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strange Problem with List | STLFBr1 | Java | 1 | Mar 7th, 2008 9:04 AM |
| Problem solving | ReggaetonKing | Software Design and Algorithms | 7 | Jan 4th, 2008 1:49 PM |
| Strange getMonth/setMonth problem | aaroncampbell | JavaScript and Client-Side Browser Scripting | 4 | Oct 31st, 2006 2:49 PM |
| strange problem | brad sue | C++ | 3 | Sep 1st, 2006 8:50 AM |
| Strange Problem? | magic_e | PHP | 10 | Feb 9th, 2006 8:54 PM |