Re: Re: Pulling my hair out over an include_once();
| From: | Watson Blair | Date: | Sun, 21 Mar 2010 06:13:15 +0000 |
| Subject: | Re: Re: Pulling my hair out over an include_once(); | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-303069@lists.php.net to get a copy of this message | ||
hey adam,
i changed the code to use file_get_contents();, however, when i tried to
later call a function form the file rss_fetch.inc it came up as an undefined
function.... did i miss something?
thanks,
Watson
On Sun, Mar 21, 2010 at 1:46 AM, Adam Richardson <simpleshot@gmail.com>wrote:
> On Sun, Mar 21, 2010 at 1:12 AM, Watson Blair <bestudios.wb@gmail.com>wrote:
>
>> ah, i forgot to properly phrase my question... what am i doing wrong, and
>> how do i make it work? slash, could you guys/girls point me towards a
>> tutorial that will give me a hand?
>> Thanks again,
>> Watson
>>
>> On Sun, Mar 21, 2010 at 1:00 AM, Watson Blair <bestudios.wb@gmail.com
>> >wrote:
>>
>> > Hey all, i'm sure i'm missing something glaringly obvious, but i have
>> yet
>> > to find a solution to this online... so heres the line of code that i'm
>> > getting hung up on:
>> >
>> > <?php include_once("ó³Sc·,Ì÷ž
>> > l–³http://www.jennysjunket.com/magpierss/rss_fetch.inc
>> > ");?>
>> >
>> > which gives me this:
>> >
>> > *Warning*: include() [function.include]: URL file-access is disabled in
>> > the server configuration in */home/content/81/5634781/html/ebay.php* on
>> > line*1*
>> >
>> > *Warning*: include(http://www.jennysjunket.com/magpierss/rss_fetch.inc)
>> [
>>
>> > function.include]: failed to open stream: no suitable wrapper could be
>> > found in */home/content/81/5634781/html/ebay.php* on line *1*
>> >
>> > *Warning*: include() [function.include]: Failed opening '
>> >
>> > http://www.jennysjunket.com/magpierss/rss_fetch.inc' for
>> > inclusion
>> > (include_path='.:/usr/local/php5/lib/php') in *
>> > /home/content/81/5634781/html/ebay.php* on line *1*
>> > *
>> > *
>> > ive got all of my permissions set as open as i can, but i'm
>> > still baffled about it.
>> > Thanks,
>> > Watson
>> >
>>
>
> There are several potential problems with trying to use include_once (same
> issues as include()) when trying to retrieve a resource by URL:
> http://www.php.net/manual/en/function.include.php
>
> Try file_get_contents instead, as in the below example:
> <?php file_get_contents("
>
> http://www.jennysjunket.com/magpierss/rss_fetch.inc");?>
>
> And if that's not enabled on your server, try using CURL as outlined in
> this tutorial:
> http://phpsense.com/php/php-curl-functions.html
>
> Adam
>
> --
> Nephtali: PHP web framework that functions beautifully
> http://nephtaliproject.com
>