Hi guys
Well, my problem is that I can't link to a .php file outside public_html. I made a new folder, and when I put the file inside it, people can't just type the URL in and go to it. I want to open this file after a password has been confirmed and I have no idea how to.
I'll be grateful for any help
Linking to files outside public_html
Moderator: General Moderators
-
tehhparadox
- Forum Newbie
- Posts: 18
- Joined: Thu Oct 01, 2009 11:55 am
- kaisellgren
- DevNet Resident
- Posts: 1675
- Joined: Sat Jan 07, 2006 5:52 am
- Location: Lahti, Finland.
Re: Linking to files outside public_html
Code: Select all
/home/account/public_html/index.php
/home/account/non_public/path/to/file.txtCode: Select all
<?php
echo file_get_contents('../non_public/path/to/file.txt');-
tehhparadox
- Forum Newbie
- Posts: 18
- Joined: Thu Oct 01, 2009 11:55 am
Re: Linking to files outside public_html
thanks Kai!
I needed that info. I can't check that code just now cos my hosting's down, but thanks all the same.
I needed that info. I can't check that code just now cos my hosting's down, but thanks all the same.