asmith Posted January 26, 2008 Share Posted January 26, 2008 hey guys $fp = fopen($file_name,"a") fwrite($fp,$data); fclose($fp); this is some part of the coding , which i guess can be so crowded sometimes, sooo many users will run this script . i'm just wondering too much trafic may cause problem in this part , may users will request to write in that file at the same time .... any solution ? Link to comment https://forums.phpfreaks.com/topic/87892-fwrite-traffic/ Share on other sites More sharing options...
laffin Posted January 26, 2008 Share Posted January 26, 2008 flock Link to comment https://forums.phpfreaks.com/topic/87892-fwrite-traffic/#findComment-449699 Share on other sites More sharing options...
asmith Posted January 26, 2008 Author Share Posted January 26, 2008 how fast is it ? if 100 people happen to write at the same time how it handles them ? Link to comment https://forums.phpfreaks.com/topic/87892-fwrite-traffic/#findComment-449705 Share on other sites More sharing options...
kenrbnsn Posted January 26, 2008 Share Posted January 26, 2008 Use a database. It will handle concurrent updates. Ken Link to comment https://forums.phpfreaks.com/topic/87892-fwrite-traffic/#findComment-449725 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.