Re: Trouble with include/require

From: Date: Fri, 16 Jul 2004 08:35:45 +0000
Subject: Re: Trouble with include/require
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-190690@lists.php.net to get a copy of this message
You should not overwrite the whole include-path. Just append new paths. This should do: [code] // Expand include-path (';' on Windows) $sep = ('WIN' == substr(PHP_OS, 0, 3)) ? ';' : ':'; ini_set('include_path', ini_get('include_path') . $sep . dirname(__FILE__) . 'includes/'); [/code] Daniel A. Lanza wrote:
Hi list, i'm trying to include files in my php scripts but things seem not to work properly. In my script, i include a file like this: <?php include 'includes/db.inc' ?> I have all include files in includes directory, that's a children of the directory where my scrips are. The include_path config. variable is set like this: include_path = ".:/php/includes" (i have uncommented that line) PHP does not include my files. What i am doing wrong? Thanks AL
-- WWE e-commerce IT GmbH Eiffestrasse 462, D-20537 Hamburg Tel.: +49-40-2530659-0, Fax: +49-40-2530659-50

« previous php.general (#190690) next »