Re: include statement errors -- something missing
| From: | Doug DeVries | Date: | Tue, 18 Jun 2002 15:48:00 +0000 |
| Subject: | Re: include statement errors -- something missing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-102716@lists.php.net to get a copy of this message | ||
I've tried a hundred different things -- YOURS WORKED! Thank you very much!
-Doug
----- Original Message -----
From: "Niklas Lampén" <niklas.lists@publico.fi>
To: "Php-General" <php-general@lists.php.net>
Sent: Monday, June 17, 2002 10:45 PM
Subject: RE: [PHP] include statement errors -- something missing
So far so good. $myfile is now a pointer to this file, so you can't
print it like that. Use fgets() or something else to read your file.
Niklas
-----Original Message-----
From: Doug DeVries [mailto:m.devries@attbi.com]
Sent: 18. kesäkuuta 2002 8:34
To: Chris Knipe; Doug DeVries; Php-General (E-mail)
Subject: Re: [PHP] include statement errors -- something missing
here is what I tried:
<?php
$myfile=fopen("http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li
=yes
&limit=4", "r");
?>
<?php echo $myfile;?>
-- but basically it returns me "Resource ID#1" which makes me feel like
I am close.
Thanks again for your time and input. I've been learning a lot as I've
been researching for this issue.
-Doug
----- Original Message -----
From: "Chris Knipe" <savage@savage.za.org>
To: "Doug DeVries" <info@spstechhelp.com>; "Php-General (E-mail)"
<php-general@lists.php.net>
Sent: Monday, June 17, 2002 3:49 PM
Subject: Re: [PHP] include statement errors -- something missing
> Yes, you will.
>
> You've only opened the file, you need to read it, and process it and
extract
> the data that you want.
>
> i.e.. $blah = fopen(http://a/a.html, "r");
>
> while ($blah) {
> do something with it
> }
>
> and so forth.... Try php.net / google.com there's lost of examples of
sites
> and pages using fopen to include data from other web sites...
>
>
> Kind Regards,
>
> Chris Knipe
> MegaLAN Corporate Networking Services
> Tel: +27 21 854 7064
> Cell: +27 72 434 7582
>
> ----- Original Message -----
> From: "Doug DeVries" <m.devries@attbi.com>
> To: "Chris Knipe" <savage@savage.za.org>; "Doug DeVries"
> <info@spstechhelp.com>; "Php-General (E-mail)"
> <php-general@lists.php.net>
> Sent: Tuesday, June 18, 2002 12:32 AM
> Subject: Re: [PHP] include statement errors -- something missing
>
>
> > Thank you, but it is not quite working yet. I get no errors, but
> > rather blank.
> >
> > http://www.solomonsporch.org/test.php
> >
> > ----- Original Message -----
> > From: "Chris Knipe" <savage@savage.za.org>
> > To: "Doug DeVries" <info@spstechhelp.com>; "Php-General
> > (E-mail)"
> > <php-general@lists.php.net>
> > Sent: Monday, June 17, 2002 12:55 PM
> > Subject: Re: [PHP] include statement errors -- something missing
> >
> >
> > > RTFM....
> > >
> > > http://www.php.net/manual/en/function.fopen.php
> > >
> > >
> >
>
fopen("http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&lim
it=4
> > > ", "r");
> > >
> > > Would give read-only access to the file, which is what you want.
> > >
> > >
> > > ----- Original Message -----
> > > From: "Doug DeVries" <m.devries@attbi.com>
> > > To: "Chris Knipe" <savage@savage.za.org>; "Doug DeVries"
> > > <info@spstechhelp.com>; "Php-General (E-mail)"
> <php-general@lists.php.net>
> > > Sent: Monday, June 17, 2002 9:36 PM
> > > Subject: Re: [PHP] include statement errors -- something missing
> > >
> > >
> > > > I tried fopen in the following way, but with no success.
> > > >
> > > > <?php
> > > >
> > >
> >
>
fopen("http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&lim
it=4
> > > > ");
> > > > ?>
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Chris Knipe" <savage@savage.za.org>
> > > > To: "Doug DeVries" <info@spstechhelp.com>; "Php-General
> > > > (E-mail)" <php-general@lists.php.net>
> > > > Sent: Monday, June 17, 2002 12:33 PM
> > > > Subject: Re: [PHP] include statement errors -- something missing
> > > >
> > > >
> > > > > I don't think you can use include like that....
> > > > >
> > > > > Have a look at fopen though, I'm not 100% sure that is going
> > > > > to
> help,
> > > but
> > > > I
> > > > > know fopen opens files on remote sites, include only does
> > > > > local.
> > > > >
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Doug DeVries" <m.devries@attbi.com>
> > > > > To: "Php-General (E-mail)" <php-general@lists.php.net>
> > > > > Sent: Monday, June 17, 2002 9:27 PM
> > > > > Subject: [PHP] include statement errors -- something missing
> > > > >
> > > > >
> > > > > > Help ... please. ...
> > > > > >
> > > > > > From the page www.solomonsporch.org/test.php I get the
> > > > > > following
> > > error.
> > > > > >
> > > > > > Warning: Failed opening
> > > > > >
>
> 'http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit
> > > =4'
> > > > > for
> > > > > > inclusion (include_path='c:\php4\pear') in
> > > e:\solomonsporch.org\test.php
> > > > > on
> > > > > > line 10
> > > > > >
> > > > > > The page HTML is as follows:
> > > > > >
> > > > > > <html>
> > > > > > <head>
> > > > > > </head>
> > > > > > <body>
> > > > > > test area should show 4 lines of news
> > > > > >
> > > > > >
> > > > > > <?php
> > > > > >
> > > > >
> > > >
> > >
> >
>
include("http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&l
imit
> > > > > > =4");
> > > > > > ?>
> > > > > >
> > > > > >
> > > > > > </body>
> > > > > >
> > > > > > </html>
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > PHP General Mailing List (http://www.php.net/)
> > > > > > To unsubscribe, visit:
> > > > > > http://www.php.net/unsub.php
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit:
> > > > > http://www.php.net/unsub.php
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit:
> > > > http://www.php.net/unsub.php
> > > >
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
###########################################
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/
###########################################
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php