NameSilo

PHP Include

SpaceshipSpaceship
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
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
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
•••
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
•••
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
•••
Why do you want to include outside files??
 
0
•••
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
NameMaxi - Your Domain Has Buyers
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back