This is a discussion on Re: include statement giving me hives! - help within the PHP General forums, part of the PHP Programming Forums category; Hi, when you call your script, is $point defined somewhere ? if $point is empty, you'll get an empty string ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 > > > |
|
|||
|
yes, I should have mentioned: $point is defined in the URL string
http://something.com/index.html?point=12 "Baroiller Pierre-Emmanuel" <baroiller@daoditu.com> wrote in message news:20030716220011.17511.qmail@pb1.pair.com... > 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 > > > > > > > > |
|
|||
|
On Thursday 17 July 2003 06:25, DougD wrote:
> > 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. > yes, I should have mentioned: $point is defined in the URL string > http://something.com/index.html?point=12 That's not the point (pun intended). Is $point empty (YES/NO)? Or does it contain what you expect it to contain? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* But you shall not escape my iambics. -- Gaius Valerius Catullus */ |