i'm writng a script that allows web site owners to rapidly update content on there site. I'm using a dbm file to hold the data, my problem is the admin is designed for multiple users(0 - 20 average) , as php locks out the dbm file when opened for writing i need to provide a mechanisum in the code that if the script is unable to open the dbm file it retrys a number of times without throwing an error...any ideas??

    • [deleted]

    A simple WHILE could do that;

    while(can't open dbm file AND retries++<max_retries)
    {
    try opening the file
    }

    But ofcourse it would be much better to use a real database, which will handle all of this for you.

      Write a Reply...