質問

I'm using EasyPHP on my computer as my localweb. I'm trying to use pre-built PHP code to use Nexmo API available at https://github.com/prawnsalad/Nexmo-PHP-lib

But when I try to send sms, I get this error: Cannot display an overview of this response

How can I fix this?

役に立ちましたか?

解決 2

Simply Try to change

var $nx_uri = 'https://rest.nexmo.com/sms/json';

to

var $nx_uri = 'http://rest.nexmo.com/sms/json';

(without s).

他のヒント

First can you enable error reporting:

<?php
error_reporting(E_ALL);
ini_set('display_error', 1);
?>

Secondly

Can you check if you have either CURL or allow_url_fopen are enabled? You can create a phpinfo() file <?php phpinfo(); ?>.

EDIT:

Can you change your code to

<?php
include "NexmoMessage.php";
$nexmo_sms = new NexmoMessage('api_key', 'api_secret');
$info = $nexmo_sms->sendText( '+447234567890', 'MyApp', 'Hello!' );

var_dump($info);
?>

Then rebun your test and feedback.

Thanks,

Kyle, Nexmo Developer and Helpdesk

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top