Page 1 of 1

include a file

Posted: Mon Apr 12, 2010 11:39 am
by ashy01
i have two files rss-direct.php and rsslib.php on the server http://d488096.u37.royaltyservers.com/sunday/
i want to include the file rsslib.php in the file rss-direct.php

is this not the pertaining code?
include("http://d488096.u37.royaltyservers.com/sunday/rsslib.php");
i have tried require,require_once,include_once also.but it doesnt get included.

Moreover it works on my localhost where i included it as include("rsslib.php");

Can someone help??what might be the problem?


Thanks
ashy01

Re: include a file

Posted: Mon Apr 12, 2010 11:51 am
by roders
If there's an html and body in rsslib.php try and remove it.

Re: include a file

Posted: Mon Apr 12, 2010 12:15 pm
by AbraCadaver

Code: Select all

include("rsslib.php");

Re: include a file

Posted: Mon Apr 12, 2010 2:21 pm
by lunarnet76
yes you are always including LOCAL file, you CANNOT include distant file (actually you can but it's if you need it!)
http://php.net/manual/en/function.include.php