Unirest PHP:使用库文件出错

时间:2016-05-23 12:08:15

标签: php unirest mashape

我从here下载了unirest库,并将其解压缩到我网站的文件夹中。我已将这段代码放在页面上:

<?php 
         require_once "/unirest-php-master/src/Unirest.php";
         $response = Unirest\Request::post("https://api4yaware-yaware-data.p.mashape.com/account/json/v2/getEmployeeLastActivity?access_key=&email=demo%2Beco%40yaware.com",
  array(
    "X-Mashape-Key" => "TSJbkryFpxmshZKbe1UxI0T9L0ddp1UFplVjsnSXjugPiVmxPd",
    "Content-Type" => "application/x-www-form-urlencoded",
    "Accept" => "text/plain"
  )
);
echo $response;
         ?>

我收到了这个错误:

  

解析错误:语法错误,意外&#39; [&#39;在   Y:\家\本地主机\ WWW \仪表板\ unirest-PHP主机的\ src \ Unirest \ Request.php   在第419行

截图:

Error screenshot

有没有办法解决它?

0 个答案:

没有答案