comment utiliser php get_headers n'obtient une partie de localisation?php get_headers emplacement
var_dump(get_headers('http://www.google.com',1));
Ce retour:
array(12) { [0]=> string(18) "HTTP/1.0 302 Found" ["Location"]=> string(21) "http://www.google.it/" ... }
Puis-je utiliser
echo (get_headers('http://www.google.com',1)["Location"];
erreur: Parse error: syntax error, unexpected '['
dans cette echo
ligne
Vous devriez regarder http://stackoverflow.com/questions/12781795/get-headers-inconsistency – Baba