Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Appending to a file...

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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.
eyewoo
New php-forum User
New php-forum User
 
Posts: 71
Joined: Sun Mar 09, 2003 10:29 am
Location: Pennsylvania, USA

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
Skeletor
New php-forum User
New php-forum User
 
Posts: 147
Joined: Tue Nov 19, 2002 7:47 am
Location: US, Ohio


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron