On my site, I have a file called .htaccess. When someone drops into my site at the URL where this file exists, it pops up a dialog box that asks a question (I use the AuthName for this) for the user to look up the answer to discover the password.
I want to change this question everyday. So I wrote a PHP script that has the questions in an array and selects the questions based on what day it is. So far, so good.
My problem, however, is that I am unable to write to this file. I get a Permission Denied type error message. So I tried to use the Chmod() to change the file to 0777. No good. It comes back "Operation not permitted..." and the line number of the Chmod().
I'm just not sure where to go from here. I want to write over (not append) this file each time the script is run. What am I doing wrong?
Thanks.
Webbiz