Page 1 of 1

setting file permissions

Posted: Wed Jun 18, 2008 10:56 pm
by clearmedia
Hi all,

I need to know how to set permissions on text files.

The files are created dynamically so I need to set the permissions as the files are created.

I basically want my php script to still be able to read/write to the files, but not allow someone to access the file by url

Cheers

Re: setting file permissions

Posted: Thu Jun 19, 2008 12:11 am
by clearmedia
all good people...

found out all i had to do was put the files outside the doc root then access them via $_SERVER['DOCUMENT_ROOT']."../somefile.txt";

Hope this may help someone else!