Use file locking, so only one instance of the script is writing to the file at a time...
www.php.net/flock ---John Holmes... ----- Original Message ----- From: "Nick Wilson" <[EMAIL PROTECTED]> To: "php-general" <[EMAIL PROTECTED]> Sent: Wednesday, May 22, 2002 9:38 AM Subject: [PHP] voting using text files > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > hi all > I have to build a php 'survey' app. but cannot use a db, > clearly text files are the way but I wondered, before I start if any of > you have done similar and might offer any words of wisdom? > > Are there any inherent problems I need be aware of for example (I can > already think of one: what if 2 people try to vote at the same time?) > > Just some general thoughts would be greatly appreciated ;) > - -- > Nick Wilson // www.explodingnet.com > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > > iD8DBQE8659rHpvrrTa6L5oRAu8PAJ48Xf71iv98nN9nTac+tyHX5PJ+VgCgrTuI > dk/+Hf8S+L9NdBo02oDt25U= > =ESei > -----END PGP SIGNATURE----- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php