Forse sono stato seduto qui per troppo tempo a fissare questo, ma PERCHÉ i file_get_contents restituiscono false qui, ho tagliato e incollato l'URL e funziona correttamente?PHP file_get_contents che restituiscono false
$url = "http://jobs.github.com/positions.json?search=" . $as_any . "&location=" . $location;
// URL contains http://jobs.github.com/positions.json?search=Project Manager&location=London
var_dump($url);
$json = file_get_contents($url);
var_dump($json);
$results = json_decode($json, TRUE);
var_dump($results);
exit;
Grazie
Marc
EDIT:
Ho controllato per allow_url_fopen e la sua sicuramente via.
possibile duplicato di [Problema nell'ottenere contenuti/file utilizzando file \ _get \ _contenuti dall'URL o Problema nella codifica geografica inversa] (http://stackoverflow.com/questions/6954220/problem-in-getting-contents-files-using -file-get-contents-from-url-or-problem-i) – mario
Nessuna delle risposte sembra essere applicabile a questa domanda. – Barmar