clearmedia Posted June 19, 2008 Share Posted June 19, 2008 Hi happy freakers! I am need of a method to change permissions of text files on my server, so that my php scripts can still access (read/write) but so they cant be accessed by direct url... Thanks for any suggestions! Quote Link to comment Share on other sites More sharing options...
xtopolis Posted June 19, 2008 Share Posted June 19, 2008 Use your FTP client to set folder permissions. I use Filezilla, right click a folder, ->file attributes, and set them there. With PHP you can use chmod. Quote Link to comment Share on other sites More sharing options...
bluejay002 Posted June 19, 2008 Share Posted June 19, 2008 well i was wondering when did people became freakin happy anyway, usually ftp clients help you set that up... am using fireFtp, one bundled with Firefox (am using Firefox 3 ). Quote Link to comment Share on other sites More sharing options...
clearmedia Posted June 19, 2008 Author Share Posted June 19, 2008 Thanks for the replies folks. I actually need to set the permissions dynamically using a php script as the text files are created dyamically themsleves. I need to know how to chmod them at runtime.. Here's hoping! Quote Link to comment Share on other sites More sharing options...
clearmedia Posted June 19, 2008 Author Share Posted June 19, 2008 All good! I realised I just needed to store the files outside of the _root directory and then access them with readfile($_SERVER['DOCUMENT_ROOT']."../textFiles/sometextfile.txt", 4096); hope this may help someone else though! thanks anyway Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.