stevenmw
08-30-2011, 04:48 AM
Say I have a file in one directory, and I want to include a file from another directory.
How would I write the file path?
How would I write the file path?
|
||||
File Pathstevenmw 08-30-2011, 04:48 AM Say I have a file in one directory, and I want to include a file from another directory. How would I write the file path? tracknut 08-30-2011, 04:54 AM We don't really have enough info to tell you for sure. But if, for example, these two directories are at the top of your site, like this: site ...../includes ...../source and you have a file in source that's trying to include a file out of the includes directory, it could be specified as "../includes/otherfile.inc" Dave stevenmw 08-30-2011, 05:18 AM Ive got a file in my directory like this root > directory1 > directory2 > directory3 > file.php and I want to include a file that's in a directory like this. root > directory1.0 > directory2.0 > file2.php How could I do that? Are there any good articles anywhere about calling directories like this? BluePanther 08-30-2011, 07:15 AM Ive got a file in my directory like this root > directory1 > directory2 > directory3 > file.php and I want to include a file that's in a directory like this. root > directory1.0 > directory2.0 > file2.php How could I do that? Are there any good articles anywhere about calling directories like this? I don't really understand what the problem is here. If you know the path to the file, just use it in an include() or require() function. There are some php constants that can help you - $_SERVER['DOCUMENT_ROOT'] as an example. Check out the $_SERVER manual on php.net to find the one you want :) |
| |||
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum