Appending to a file...

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 71
Joined: Sun Mar 09, 2003 10:29 am
Location: Pennsylvania, USA

Appending to a file...

Postby eyewoo » Fri May 09, 2003 5:32 am

A question related to the amount of time it takes to open and write to a text file using fopen($fileName,'a+').

Does the size of the file being opened make any difference regarding the amount of time it takes to open, write, and then close a file when a+ is being used.

My concern relates to log files that could grow quite large over time.

User avatar
New php-forum User
New php-forum User
Posts: 147
Joined: Tue Nov 19, 2002 7:47 am
Location: US, Ohio

Postby Skeletor » Fri May 09, 2003 6:38 am

I'm not sure about the answer to the question, but one suggestion might be to split up the log files. Perhaps have your logging script create a new file every month, week, or day. Doing it daily hasn't been a problem and it is easy to maintain.

Good luck

Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 1 guest