![]() |
|
| |||||||
| Notices |
| mySQL & PHP Discussions, information and help with mySQL and PHP. |
![]() |
| | Thread Tools |
|
#1
| |||
| |||
|
Hello everyone; I am in desperate need of some help with this! I am constructing a website with css and php_includes. My problem is that I do not know how to reference the root directory (where the includes file is) from within a deep-rooted subdirectory. I know that I can reference a file in the root directory from "root/sub/file" by prefixing the includes path with "../", however how can I reference the root from "root/sub/sub/file"? I really would appreciate any help here as I have been searching the internet for an answer for the last three days! Thank you for your time, - Benjamin. |
|
#2
| |||
| |||
|
Hi This is a theory ok? Seems to me that all you have to do is to www.domain.com/include. Looks like you have been in the guru level and forgot the basic level. However, as I said, this is theory. Cheers Millie www.subeagle.com |
|
#3
| ||||
| ||||
|
Most VH servers are set NOT to allow URL includes. So the solution posted by millie won't work. You can reference your includes file as: /home/cpusername/public_html/includes_file.php if you are on a VH account .
__________________ Navaldesign Logger Lite: Low Cost, Customizable, multifeatured Login script Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more.... Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA! |
|
#4
| |||
| |||
|
Hi So, that means the include codes are in the include_file.php, right? But /home/cpusername/public_html/... would really say (in my case) /www.subeagle.com/mycpusername/pub... (with the www in front of subeagle), right NavalDesign? Thanks Millie www.subeagle.com |
|
#5
| ||||
| ||||
| Quote:
Quote:
No www, no subeagle.com. Just replace the "mycpusername" with your real CP username. This is the path to your root folder. Of course this assumes that the file you need to include is in your root folder, as you posted above.
__________________ Navaldesign Logger Lite: Low Cost, Customizable, multifeatured Login script Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more.... Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA! |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |