Re: include (or require) doesn't seem to work

From: Date: Tue, 11 May 2004 19:52:39 +0000
Subject: Re: include (or require) doesn't seem to work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-185941@lists.php.net to get a copy of this message
Think you want something like this. require("/tristan/library.php"); > Hi, > > I'm almost ashamed to ask this question as surely enough the > problem is something very basic but, nonetheless, I can't put my finger on > it. I'm trying to implement the concept of a library (library.php) on PHP > where I define (once) all auxiliary functions and then use them in a file > (for instance index.php) via the 'require' or 'include' constructs. > Here's > a > reduced version of what I'm doing: > > > > index.php: > > <?php > $lang = (isset($_REQUEST['lang']) ? $_REQUEST['lang'] : "es"); > echo "index.php: include_path is " . > (ini_get('include_path'))."<br>"; > require("http://tristan/library.php?lang=$lang"); > my_function("en"); > ?> >

« previous php.general (#185941) next »