07-24-2008, 09:38 AM
|
#2 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
Quote:
Originally Posted by ncorpse
Hi everyone
I'm working on a small php application that stores adresses in a mysql database. I'm using a class for printing HTML code.
So I need to include several files in several files 
the problem is, that i cannot use absolut paths with require or include.
I tried to define a constant and use it like a document root.
PHP Code:
//define
define('DOCUMENT_ROOT','/var/www/tmp/');
//usage
require(".DOCUMENT_ROOT.".'dir2');
Can anyone show me off how I should manage my includes in a project?
Sry for my crappy english
ncorpse
|
try
PHP Code:
require(DOCUMENT_ROOT.'dir2');
DOCUMENT_ROOT without the quotes.
__________________
VillageIdiot can have my babbies ;d
|
|
|
|