include a file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ashy01
Forum Newbie
Posts: 1
Joined: Mon Apr 12, 2010 11:32 am

include a file

Post 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
roders
Forum Commoner
Posts: 68
Joined: Tue Oct 20, 2009 9:29 am

Re: include a file

Post by roders »

If there's an html and body in rsslib.php try and remove it.
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: include a file

Post by AbraCadaver »

Code: Select all

include("rsslib.php");
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
lunarnet76
Forum Commoner
Posts: 67
Joined: Sun Apr 04, 2010 2:07 pm
Location: Edinburgh

Re: include a file

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