Re: include statement giving me hives! - help

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-16-2003
Baroiller Pierre-Emmanuel
 
Posts: n/a
Default Re: include statement giving me hives! - help

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
>
>
>



Reply With Quote
  #2 (permalink)  
Old 07-16-2003
Dougd
 
Posts: n/a
Default Re: include statement giving me hives! - help

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
> >
> >
> >

>
>



Reply With Quote
  #3 (permalink)  
Old 07-17-2003
Jason Wong
 
Posts: n/a
Default Re: [PHP] Re: include statement giving me hives! - help

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
*/

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:00 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0