PHP:json_decode阻止执行进一步的代码

时间:2016-03-12 19:34:57

标签: php json http-headers soundcloud

这是我的代码:

echo "START";
echo "<br />";

try {
    $check = json_decode($soundcloud->get('me/followings/2521254'), true);
} catch (Services_Soundcloud_Invalid_Http_Response_Code_Exception $e) {
    exit($e->getMessage());
} 

echo "<br />";
echo "END";

当我执行文件时,它看起来像这样:

START
The requested URL responded with HTTP code 303.

HTTP代码303确实意味着用户正在跟踪特定的人(如果不是它的404),但这不是重点 - 这个问题与SoundCloud API无关。

实际问题是: try块未执行后的echo(echo "END";)。

问题是什么,我该如何解决?

0 个答案:

没有答案