Hi,
Can anyone help me - I use fopen to open a txt file it always returns success.
I fopen with a "a+" as I need to read and write.
When I use
while($buffer = fgets($fp , 4096)){
}
It returns one blank line and quits the line.
I have also used
while (!feof ($fp)){
$buffer = fgets($fp , 4096)
}
same thing, one blank line. Permissions are fine am using Linux OS.
I know definitely 100% that the file contains text!! (5 lines) Why does it return one blank line and quit the loop??
Any help would be appreciated.
Cheers
{Greenster}
Can anyone help me - I use fopen to open a txt file it always returns success.
I fopen with a "a+" as I need to read and write.
When I use
while($buffer = fgets($fp , 4096)){
}
It returns one blank line and quits the line.
I have also used
while (!feof ($fp)){
$buffer = fgets($fp , 4096)
}
same thing, one blank line. Permissions are fine am using Linux OS.
I know definitely 100% that the file contains text!! (5 lines) Why does it return one blank line and quit the loop??
Any help would be appreciated.
Cheers
{Greenster}