file_get_contents() Fehler

Ich bin mit file_get_contents auf meine PHP und wirft es einige Fehler:

Mein code

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

Den Fehler:

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

Irgendeine Idee? Es funktionierte gut in meinem computer, aber aufgehört zu arbeiten, wenn ich portiert es auf den web-server.

  • Btw, seit Sie laden möchten, xml, verwenden Sie die Funktion simplexml_load_file, nach der Einstellung allow_url_fopen.
InformationsquelleAutor Tu Hoang | 2011-07-01
Schreibe einen Kommentar