NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page PHP Include

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 11-18-2005, 02:21 PM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Mar 2004
Location: North West England
Posts: 626
chris_reilly is a jewel in the roughchris_reilly is a jewel in the roughchris_reilly is a jewel in the rough
 



PHP Include


<?
include("usersonline/users.php");
?>

= a working include, on the same domain

<?
include("http://www.usavioservices.com/usersonline/users.php");
?>

= external include, doesnt work, no errors


How can i get it to work?
__________________
Christopher Adam Reilly
'I will follow my dream, Until the dream decides to follow me' Chris Reilly - 05
chris_reilly is offline  
Old 11-18-2005, 03:05 PM   #2 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



In order to include remote files you need to have the allow_url_fopen setting in your php.ini enabled. If you don't have root access, then you'd have to ask your host to enable it. You can see whether or not it is enabled by looking at your phpinfo().
deadserious is offline  
Old 11-18-2005, 03:31 PM   #3 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,074
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
also the internal include would include the contents before parsing the script the external 1 would be after it parsed the script so depending on what the script was would depend on wether either would work.
Peter is offline  
Old 11-18-2005, 03:35 PM   #4 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



Yea what filth said. To make it a little more clear, the remote include is going to include the output of the script. If you're trying to include some configuration file or something from a remote domain it's not going to work.
deadserious is offline  
Old 11-22-2005, 10:48 AM   #5 (permalink)
Account Closed
 
LeetPCUser's Avatar
Join Date: May 2005
Location: Whitewater, WI
Posts: 3,710
LeetPCUser is a splendid one to beholdLeetPCUser is a splendid one to beholdLeetPCUser is a splendid one to beholdLeetPCUser is a splendid one to beholdLeetPCUser is a splendid one to beholdLeetPCUser is a splendid one to beholdLeetPCUser is a splendid one to behold
 


AIDS/HIV
Why do you want to include outside files??
LeetPCUser is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial: Getting started with PHP (The Basics) deadserious Webmaster Tutorials 60 11-17-2007 11:35 AM
Googlism - What does google think of you? deadserious The Break Room 55 12-15-2005 09:09 AM
PHP Include Shop GHOwner For Sale / Advertising Board 0 10-18-2004 05:13 PM

 
All times are GMT -7. The time now is 02:03 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger