Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

PHP Include

SpaceshipSpaceship
Spacemail by SpaceshipSpacemail by Spaceship
Namecheap AuctionsNamecheap Auctions
Watch

chris_reilly

Established Member
Impact
2
<?
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?
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
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().
 
0
Close
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.
 
0
Close
Yea what filth said. :D 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.
 
0
Close
Why do you want to include outside files??
 
0
Close
Appraise.net

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

A browser tab with a favicon next to the page title
Search members
You can now search for members by name, company, location and more. Open the search at the top of any page and choose Members. You will...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back