file_get_contents() erreur

J'utilise file_get_contents sur mon PHP et il jette quelques erreurs:

Mon code

#try to fetch from remote
$this->remotePath = "http://some-hostname.com/blah/blah.xml
$fileIn = @file_get_contents($this->remotePath);

Les erreurs:

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /virtual/path/to/file/outputFile.php on line 127

Warning: file_get_contents(https://some-host-name/data/inputFile.xml) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /virtual/path/to/file/outputFile.php on line 127

Une idée? Il a bien fonctionné sur mon ordinateur, mais a cessé de fonctionner lorsque je l'ai porté sous le serveur web.

Btw, puisque vous voulez charger le fichier xml, utilisez la fonction simplexml_load_file, après la mise en place allow_url_fopen.

OriginalL'auteur Tu Hoang | 2011-07-01