htaccess problem

They have: 7 posts

Joined: Feb 2001

This doesnt really apply to this forum, but I couldnt find anywhere else to post this question :

On my site I am using a PHP script, that stores information in 2 text format files (these files and the PHP have to be in the same directory), now I dont want snoopers looking at the contents of these files so I have hidden them behind htaccess.

Problem is I cant call the php script from a page outside the htaccess without the user having to enter a password (which I dont want, as it defeats the point)

Any suggestions??

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

I'm not quite sure I understand....

Why don't you move the PHP file to where you can execute it, then change the path to the other two files?

They have: 7 posts

Joined: Feb 2001

I can see where your going and it looks like the only way I can do what I want. So next question is can a PHP script call a TXT file that is hidden behind htaccess without having to enter a password

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

hmmm....

I'm no htaccess pro. But I'd try it. Let us know if it works (or doesn't).

quick Q: Why aren't you using a database instead of files (which you seem to have to hide)?

Mark Hensler
If there is no answer on Google, then there is no question.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.