[SOLVED] full path to a folder?

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
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

full path to a folder?

Post by C_Calav »

can someone tell me how to find out the full path to a folder on a webserver?

/the/full/path/to/pics

where pics is my folder where the pics get uploaded too.

the reason is i changed the domain names, re uploaded everything and my pictures upload section does not work anymore.

put what i thought was the new full path but it was obvisouly wrong by the eroor message.

thanx :D
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Code: Select all

echo $_SERVER['DOCUMENT_ROOT'];
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

thanx ol4pr0,

where abouts do i put that echo?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Code: Select all

echo realpath('.');
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

also

Code: Select all

echo cwd();
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

where do i put all these echos in my script?!

thanx guys!
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

doesnt matter
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

got it working now thanx guys!
Last edited by C_Calav on Tue Dec 14, 2004 12:57 am, edited 1 time in total.
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

just put it in a blank file, load it, and see what the output is.
Post Reply