Pusher通知PHP“404 NOT FOUND”

时间:2017-11-28 16:00:12

标签: php pusher

我需要从推送通知包中获取此错误的帮助。

在尝试通过HTTP POST(curl)发送数据时,API返回“404 NOT FOUND” 我的代码是这样的:

的index.php

<?php

require(dirname(__FILE__).'/../vendor/autoload.php');
$app_id = getenv('my_app_id');
$app_key = getenv('my_app_key');
$app_secret = getenv('my_app_secred_key');
$pusher = new Pusher\Pusher($app_key, $app_secret, $app_id);
$data['message'] = 'hello world';
$test = $pusher->trigger('channel', 'event', $data, null, true);

var_dump($test);

var_dump($ test)的返回是:

array(2) { ["body"]=> string(14) "404 NOT FOUND " ["status"]=> int(404) }

有什么想法吗?

0 个答案:

没有答案