I have a .txt file and I don't want anyone to view it (including myself) but I still want my PHP scripts be able to read it and write to it. Is there a way of securing that .txt file like that?
Thanks, Koenie
secure a .txt file
Page 1 of 110 Replies - 1593 Views - Last Post: 19 December 2002 - 09:41 AM
Replies To: secure a .txt file
#2
Re: secure a .txt file
Posted 17 December 2002 - 06:16 PM
yup there is, it's called a .htaccess page, and i'll tell you how to make it, in a moment, gotta pull up the code...
#3
Re: secure a .txt file
Posted 17 December 2002 - 06:18 PM
ok create a file named .htaccess
and put the following in it
and then upload it to the dir where the file you don't want anyone to see is. i usually make a config folder and it only ever contains a config file and the .htaccess file
hope this helps you, if not ask more and i'll try to help you out better
and put the following in it
<files "*.*"> deny from all </files>
and then upload it to the dir where the file you don't want anyone to see is. i usually make a config folder and it only ever contains a config file and the .htaccess file
hope this helps you, if not ask more and i'll try to help you out better
#4
Re: secure a .txt file
Posted 18 December 2002 - 02:03 AM
That won't prevent people with shell access from viewing it.
#5
Re: secure a .txt file
Posted 18 December 2002 - 08:51 AM
then what do you suggest?
#6
Re: secure a .txt file
Posted 18 December 2002 - 08:58 AM
gneato, on Dec 18 2002, 05:03 AM, said:
That won't prevent people with shell access from viewing it.
nothign will prevent someone from accesing a file.. IF THEY HAVE SHELL ACCESS!
#7
Re: secure a .txt file
Posted 18 December 2002 - 09:21 AM
Quik, on Dec 18 2002, 09:58 AM, said:
gneato, on Dec 18 2002, 05:03 AM, said:
That won't prevent people with shell access from viewing it.
nothign will prevent someone from accesing a file.. IF THEY HAVE SHELL ACCESS!
Unix has this really cool feature called permissions.
Unfortunately, Guardian's current setup runs every single site's php with the same username (most web hosts are like this) so if one site's php script can look at a file, so can the other site's php scripts.
If you're only worried about people viewing the file from the internet, then the .htaccess is a great way.
#8
Re: secure a .txt file
Posted 19 December 2002 - 06:01 AM
Can my PHP scripts still work with it this way?
How does the file need to be called? just '.htacces'?
Can I make that file using something like: notepad?
Koenie
How does the file need to be called? just '.htacces'?
Can I make that file using something like: notepad?
Koenie
#9
Re: secure a .txt file
Posted 19 December 2002 - 08:54 AM
call the file .htaccess
yes your scripts can still work, if of course, they're being included in another script...
and yes, you can use notepad to create that file in
yes your scripts can still work, if of course, they're being included in another script...
and yes, you can use notepad to create that file in
#10
Re: secure a .txt file
Posted 19 December 2002 - 09:38 AM
But if you make it one a windows machine you will have to name is something other then .htaccess and upload it and change the name, windows doesn't like a filename starting with .
#11
Re: secure a .txt file
Posted 19 December 2002 - 09:41 AM
Cookie Mobster, on Dec 19 2002, 10:38 AM, said:
But if you make it one a windows machine you will have to name is something other then .htaccess and upload it and change the name, windows doesn't like a filename starting with .
that's odd, i have no problems making .htaccess files on a windows machine...
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|