Jump to content


Access a parent directory

  • Please log in to reply
1 reply to this topic

#1 otuatail

  • Members
  • PipPipPip
  • Advanced Member
  • 960 posts

Posted 23 July 2006 - 07:37 AM

I have some pages in a sub directory but I still want to acces a configuration in the parent directory. I also want to re-direct to a page in the parent. I thought    /..  but this is all the way back to the root. Yhis is a bit of the code.

include ("functions.inc");  //      /.functions.inc

header('Location: access.php');  //    /.access.php


#2 Orio

  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 23 July 2006 - 09:04 AM

Let's say you got a folder called "outside" that has in it a file called "outside_file.php" and has a folder in it called "inside". "inside" folder has a file called "some_file.php", and in it you want to include "outside_file.php". You'll do this:


It's "../" which means parnet directory.

Think you're smarty?

(Gone until 20 to November)

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users