7 messages in net.php.lists.php-dbRE: [PHP-DB] php includes
FromSent OnAttachments
JeRRyDec 28, 2003 5:24 pm 
ph...@aynsoft.comDec 29, 2003 10:47 pm 
-{ Rene Brehmer }-Dec 30, 2003 4:05 am 
mayoJan 13, 2004 2:05 pm 
Justin PatrinJan 13, 2004 2:26 pm 
Ale...@ USA.netJan 14, 2004 7:37 am 
mayoJan 14, 2004 1:35 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:RE: [PHP-DB] php includesActions...
From:Ale...@ USA.net (alek@usa.net)
Date:Jan 14, 2004 7:37:33 am
List:net.php.lists.php-db

Looking at your code, I do this:

<? include 'navTop.php';

?>

Includes usually work with files that are in the same directory. Otherwise you need to access your PHP.ini file and modify your include_path = statement to include the complete path were your include files reside. Look for a section labeled Paths and Directories.

Hope this helps...

Aleks

-----Original Message----- From: mayo [mailto:ma@nycinteractive.com] Sent: Tuesday, January 13, 2004 5:06 PM To: php@lists.php.net Subject: [PHP-DB] php includes

I'm new to php (I've been in the CF world the last few years) and have a basic question regarding includes:

On my dev box (a fancy term for laptop) I have the following include:

<?php include ("navTop.php"); ?>

This doesn't work on the client's site. There I have to use:

<?php include ("/home/sites/www.abc.com/web/navTop.php"); ?>

I can't use relative links.

So is there any trick that people have so that I don't have to touch each of my files before sending them up?

gil