Afficher un message
Vieux 12/09/2007, 17h26   #5
Paul Herber
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: file_get_contents() or file() not working with URL on same server

On Wed, 12 Sep 2007 10:17:10 -0000, mmarlow@gmail.com wrote:

>Hi all,
>I'm trying to get the contents of a file from a URL using
>file_get_contents() or file(). It doesn't work, it eventually just
>times out. It used to display a 'failed to open file' message but now
>returns nothing at all.
>
>- it works with any site that's not on our server, eg: google.com
>- allow_url_fopen is ON (proven with the above test)
>- we have two load balanced servers with identical settings, could
>this be an issue?


I had a similar problem when a hosting company started using a load
balancer. I wanted to share a file from a subdomain amongst various
other subdomains (it was actually a file containing some exchange rate
data that I wanted to be common between various subdomains).

The hosting company's support people gave me their solution:

include
'http://www.sub.mydomain.dom.web-internal.hostdomain.net/myfile.php';

Maybe your hosting company can do something similar ...


--
Regards, Paul Herber, Sandrila Ltd. http://www.sandrila.co.uk/
  Réponse avec citation
 
Page generated in 0,05646 seconds with 9 queries