|
|
Posted Apr 16, 2009 at 6:05:41 PM
Subject: Problem with the fopen function- PHP
hello.
i tried to open a file with the function.
first of all, when i try to open it just for reading ('r') and print it, it skips the first line (when i use fgets, on fgetc it prints it ok but every character in a new line).
when i try to open with r+, w, w+, a, x, x+, it gives me a warning.
my questions are so:
1.how can i make fgets print all the text, including the first line?
2.how can i make fgetc print the file as it is and print a new line only when the file has one?
3.what permissions i need to give the file i read so i can open it for writing too?
tnx a lot and have a nice day,
niv.
|