include statement giving me hives! - help

From: Date: Wed, 16 Jul 2003 20:37:44 +0000
Subject: include statement giving me hives! - help
Groups: php.general 
Request: Send a blank email to php-general+get-155486@lists.php.net to get a copy of this message
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 (#155486) next »