Problems with includes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux