Re: include statement giving me hives! - help

From: Date: Wed, 16 Jul 2003 22:00:06 +0000
Subject: Re: include statement giving me hives! - help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-155498@lists.php.net to get a copy of this message
Hi, when you call your script, is $point defined somewhere ? if $point is empty, you'll get an empty string for $links_include and include $links_include will not work. Regards, P.E. Baroiller "Dougd" <info@bigfresh.com> a écrit dans le message de news:20030716203734.44862.qmail@pb1.pair.com... > I am new to all this, but here is the basic code: > > $link_titles = file('links/master.txt'); > $links_include = $link_titles[$point]; // path to directory > include $links_include; > > If I echo the value of $links_include just prior to the include() function > it contains what I would expect it to contain and the file does exist. But I > get an error: > > Warning: main(./main/links/topsites.php ) [function.main]: failed to create > stream: No such file or directory in ..... on line 23 > > Warning: main() [function.main]: Failed opening './main/links/topsites.php ' > for inclusion (include_path='.:/usr/local/lib/php') in .... on line 23 > > If I add the line: > > $links_include = "path to intended include file"; > > just prior to the include statement it works fine. > > Am I missing something? I've tried a variety of renditions of the include() > statement and can't get it to react unless I 'hard code' the value of > $links_include. > > Appreciate your help!! > > -Doug > > >

« previous php.general (#155498) next »