Używam file_get_contents na moim PHP i rzuca pewne błędy:file_get_contents() Błąd
Mój kod
#try to fetch from remote
$this->remotePath = "http://some-hostname.com/blah/blah.xml
$fileIn = @file_get_contents($this->remotePath);
błędów:
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
jakiś pomysł? Udało mi się to dobrze na moim komputerze, ale przestałem działać po przeniesieniu go na serwer WWW.
Btw, ponieważ chcesz załadować xml, użyj funkcji simplexml_load_file, po ustawieniu allow_url_fopen. –