try this: echo "you " . ( is_writable("testfile2.php")? 'can ' : 'cannot' ) . " write";
the function is_writable() will tell you in advance whether the file is writable or not. -- Maxim Maletsky [EMAIL PROTECTED] "Don Mc Nair" <[EMAIL PROTECTED]> wrote... : > Sorry if this is not really PHP related but I can't get it to work. > > I am using fopen and I get the following: > > Warning: fopen("testfile2.php", "w") - Permission denied in > /usr/local/psa/home/vhosts/complementarymedicines.net/httpdocs/reg/regformte > st.php on line 411 > > I have tried setting this particular folder, it's parent folder and the > folder where the file will be created to 777 but I still get the error. I > know it is probably simple but it is driving me nuts. > > Any help is appreciated. > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.443 / Virus Database: 248 - Release Date: 10/01/2003 > > > > -- > 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