On Fri, May 16, 2008 at 2:25 PM, Tyson Vanover <tvanover@xxxxxxx> wrote: > I am trying to keep my tools and pages segregated for a variety of reasons > (organization, security, etc). And I am having problems with my includes on > my LAMP box. My user facing tools are not including my utility classes and > files. > > The root directory of my web server (www.hostname.com/) is: > /srv/www/html/ > > My utility classes and files that need to be included by many of my user > tools are in subdirectories of: > /srv/www/html/Tools > ie > /srv/www/html/Tools/tool1/tool1.php > /srv/www/html/Tools/tool2/tool2.php > included in these sub directories are tool testing pages > (toolname-test.php) and other includes. As long as the file that is > including other files is in the same directory as the files it is including, > it works just fine. > > My user tools each have their own subdirectories off the webserver root > /srv/www/html/ > ie > /srv/www/html/library/index.php > > > So I would think that to include my utility files into my user tools I > would start the file with something like this: > > require "/Tools/tool1/tool1.php"; > require "/Tools/tool2/tool2.php"; > > But when I do I get: > require(/Tools/dbtools/dbtool.php) [function.require]: failed to open > stream: No such file or directory /srv/www/html/lib/index.php, line 16 > > require() [function.require]: Failed opening required > '/Tools/dbtools/dbtool.php' (include_path='.:/usr/share/pear') > /srv/www/html/lib/index.php, line 16 > > Am I missing something? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > I'm pretty sure you're gonna need to include the entire path: require( "/srv/www/html/Tools/tool2/tool2.php" ); for both of your tools. -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Reseller plans and Dedicated servers available. "Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life."