Parse error: syntax error, unexpected T_STRING in php

后端 未结 3 957
南方客
南方客 2020-12-19 11:10


        
3条回答
  •  星月不相逢
    2020-12-19 11:46

    Why quote it at all? I can't imagine the Google API requires (or even expects) that value to be quoted.

    $json_url = file_get_contents('http://maps.google.com/maps/api/geocode/json?address=jaipur&sensor=false'); //line 9
    

    Or, is jaipur a variable? If so:

    $json_url = file_get_contents("http://maps.google.com/maps/api/geocode/json?address=$jaipur&sensor=false"); //line 9
    

    Hard to tell from your question what it is you're trying to accomplish...

提交回复
热议问题