Php Include File Outside Of Public_html

Hello!<br /><br />I have a file called "functions.php" in the public_html directory and I want to include the file named "secure.php" located in the top most directory of my account. In functions.php I have tried to enter:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->include "/secure.php";<!--c2--></div><!--ec2--><br />But it doesn't seem to work. Also tried:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->include "/home/mysite/secure.php";<!--c2--></div><!--ec2--><br />to no avail. Please help out a brainless geek, please?<br /><br />Thanks!<br /><br />PS: Maybe I don't need to do this. My goal is to make the script to connect to the database secure so no one else can see it. If you have other ideas on this, please let me know!<!--content-->
You might want to try <br />include("/home/mysite/secure.php");<br /><br />Hope this helps <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
Does the code work correctly if you put the secure.php file in your public_html folder -- that is, are you certain this is a problem with the include path and not the code? (Not that I've spent hours staring at an include path only to discover the code itself was to blame, or anything... <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/rolleyes1.gif" style="vertical-align:middle" emoid=":rolleyes1:" border="0" alt="rolleyes1.gif" /><!--content-->
 
Back
Top