07-24-2008, 09:36 AM
|
#1 (permalink)
|
|
The Visitor
Join Date: Jul 2008
Posts: 4
Thanks: 1
|
require problem with absolut paths
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
|
|
|
|