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

Posts: 331
Location: Ontario, Canada
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: chris.krasnichuk@gmail.com
Chris_krasnichu is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 12-15-2003, 05:57 PM
OnlyPhp.Com's Avatar
Extreme Talker

Posts: 177
Location: World
../ 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.

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
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: chris.krasnichuk@gmail.com
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
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
thanks
__________________
Name: Chris Krasnichuk
Email Address: chris.krasnichuk@gmail.com
Chris_krasnichu is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to php code question?
 

Thread Tools

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

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


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


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

 


Page generated in 0.13487 seconds with 12 queries