我使用的是php5.6和wamp5 1.6.5。
我正在尝试简单的代码
$response=Unirest\Request::get("https://indianpost.p.mashape.com/getPincodes.php?name=delhi",array("X-Mashape-Key" => "mykey","Accept" => "application/json"));
然后我得到了错误。可以从这里帮助我。
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in
C:\wamp\www\myapplication\index.php on line 11
Parse error: parse error, unexpected T_STRING in
C:\wamp\www\myapplication\index.php on line 11
请帮帮我。
这是代码
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<?php
// put your code here
// These code snippets use an open-source library.
$response =
Unirest\Request::get("https://indianpost.p.mashape.com/getPincodes.php?
name=delhi",array("X-Mashape-Key" => "mykey","Accept" =>
"application/json"));
?>
</body>
</html>