PHP script: Script not writing .txt file
Posted by: allhop
Posted on: 2007-10-29 13:54:00
I have set up a Flash-based form that collects the user's entered information. The first PHP script, SendEcard.php, then calls the variables and writes them to a .txt file. The second PHP script, SelectCard.php, uses the information from the .txt file to send out an E-card with the user's information written to the card. Here is a working example: http://artelius.com/Ecards/testcards.htm
Once you fill out the information and click the send button, you should receive an email with a link to your E-card. The E-card will have your name, message, etc. that you entered in the online form.
This example has a directory, "dBText", which is assigned 777 permissions. The dBText directory is where the .txt file is written by the SendEcard.php.
I have read that 777 permissions are not good for security reasons and have tried to create another E-card using 766 permissions for the "dBText" directory. Here is the example: http://artelius.com/EcardsTest/testcards.htm
This example will collect the information in the .txt file, however, it won't write the text to the E-card.
I created the "dBText" directory using different methods (Fetch, using ssh and then chmod 766).
Why would assigning a directory 766 permissions prevent the file from accessing the .txt file? Am I missing something?
Thanks,
Angela