Jump to content

Recommended Posts

I have this code in an index.php file on a friends server (http://moha.xabbu.net)

<?php
require_once('http://beta.iarp.ca/moha/'); # My server
?>

 

For some reason, whenever we view the page it's completely blank. If you look at the source code the entire page(on xabbu) is there. No clue why tho, any hints?

Link to comment
https://forums.phpfreaks.com/topic/150206-solved-require_once-across-domains/
Share on other sites

I'm trying to get a page from my domain iarp.ca to show on a friends subdomain xabbu.net.

 

At first i tried this code on moha.xabbu.net:

<?php
require_once('http://beta.iarp.ca/moha/');
?>

 

But that only resulted in a blank white page, and if you clicked CTRL+U to see the source code you ended up seeing the entire document source code but not the result. http://beta.iarp.ca/moha/ should be the visible result but as you can see on http://moha.xabbu.net it's completely blank and yet the source code is all there.

 

I tried this code with the same effect as above:

<?php
$homepage = file_get_contents('http://beta.iarp.ca/moha/');
echo $homepage;
?>

 

As taken from the php.net link in the first reply.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.