Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Old 12-15-2003, 04:41 PM php code question?
Chris_krasnichu's Avatar
Ultra Talker

Posts: 331
Location: Ontario, Canada
Trades: 0
Hello,
when you include a file in php,
does ../../ mean one level closer to the main directory?
I'm needing to know this cause it would help me out alot.
thanks in advance.

Chris
__________________
Name: Chris Krasnichuk
Email Address:
Please login or register to view this content. Registration is FREE
Chris_krasnichu is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-15-2003, 05:57 PM
OnlyPhp.Com's Avatar
Extreme Talker

Posts: 177
Location: World
Trades: 0
../ goes one directory down. For example you're in /public_html/yourdir ../ goes one level down do public_html/

../../ goes 2 directories down. For example you're in public_html/yourdir/yourdir2 ../../ goes 2 levels down to public_html/ directory.

__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
OnlyPhp.Com is offline
Reply With Quote
View Public Profile Visit OnlyPhp.Com's homepage!
 
Old 12-15-2003, 06:04 PM
Chris_krasnichu's Avatar
Ultra Talker

Posts: 331
Location: Ontario, Canada
Trades: 0
ok...
so would I be abkle to do somthing like this:
directory script is in: public_html/noads/whoa/cheats
directory include file is in: public_html/noads/amember/yeah.php
include line: include "../../amember/yeah.php

Would I be able to do that?

Chris
__________________
Name: Chris Krasnichuk
Email Address:
Please login or register to view this content. Registration is FREE
Chris_krasnichu is offline
Reply With Quote
View Public Profile
 
Old 12-15-2003, 08:07 PM
WaHoOoO!'s Avatar
Mentally Unstable Tugboat Captain

Posts: 797
Name: Chad
Location: /usr/bin/perl
Trades: 0
Exactly.

Another way is to come UP from the root directory.

For example:

Say your file is in public_html/noads/whoa/cheats
And you want to get to public_html/noadss/amember/yeah.php

Assuming your public_html directory is in your root, then /public_html/noads/amember/yeah.php would work instead.
__________________
He's baaaaaaaack....
WaHoOoO! is offline
Reply With Quote
View Public Profile Visit WaHoOoO!'s homepage!
 
Old 12-15-2003, 11:51 PM
Chris_krasnichu's Avatar
Ultra Talker

Posts: 331
Location: Ontario, Canada
Trades: 0
thanks
__________________
Name: Chris Krasnichuk
Email Address:
Please login or register to view this content. Registration is FREE
Chris_krasnichu is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to php code question?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22866 seconds with 12 queries