a simple question??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
PHPycho
Forum Contributor
Posts: 336
Joined: Fri Jan 06, 2006 12:37 pm

a simple question??

Post by PHPycho »

i had used

Code: Select all

include "/file.php";
include "./file.php";
include "../file.php";
But i had seen following

Code: Select all

include "../../file.php";
i had no concept when to use this
../../
anybody has idea....if yes Please tell me
User avatar
khaki_monster
Forum Commoner
Posts: 73
Joined: Tue Oct 11, 2005 12:36 am
Location: Philippines
Contact:

Post by khaki_monster »

../../file.php - means that your file is under 2 subfolders up. /folder1/folder2/file.php - means your file is under 2 folders down.
just observed how your windows explorer works while accessing some files. :)
i hope my explaination is clear coz im not good in explaination as wil' s as my english grammar. haha :) goodlock!

cheerz!
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

You should lookup what a "relative path" is. Another thing that might be of intrest is the value of http://www.php.net/get_include_path.
Post Reply