私はtwitterでユーザーのフォロワーをリストするphpの関数を持っています。クロムを使用して機能を保持するページに移動すると、機能しないことがあります。 ":不明なエラーエラー330(ネット:: ERR_CONTENT_DECODING_FAILED)" それは "コンテンツのエンコードエラー"Chrome、Opera、Mozillaコンテンツのデコードに失敗しました
を与える前に、
Mozillaは5回のうち4つを働くことができます前に、
Chromeは5回のうち3作品foreachのために供給無効な引数() Cで:\ WAMP \ WWW \ ntwyt \コア\共通\のtwitter.phpライン上の1639 J & XO Operaはこの
警告を示してい4 a h RA N &開き量Kmn 5Y私はY
@ <Т K /o4¨bは、ここでは、コード
function theme_followers($feed, $hide_pagination = false) {
$rows = array();
if (count($feed) == 0 || $feed == '[]') return '<p>No users to display.</p>';
foreach ($feed->users->user as $user) {
$name = theme('full_name', $user);
$tweets_per_day = twitter_tweets_per_day($user);
$last_tweet = strtotime($user->status->created_at);
$content = "{$name}<br /><span class='about'>";
if($user->description != "")
$content .= "Bio: " . twitter_parse_tags($user->description) . "<br />";
if($user->location != "")
$content .= "Location: {$user->location}<br />";
$content .= "Info: ";
$content .= pluralise('tweet', $user->statuses_count, true) . ", ";
$content .= pluralise('friend', $user->friends_count, true) . ", ";
$content .= pluralise('follower', $user->followers_count, true) . ", ";
$content .= "~" . pluralise('tweet', $tweets_per_day, true) . " per day<br />";
$content .= "Last tweet: ";
if($user->protected == 'true' && $last_tweet == 0)
$content .= "Private";
else if($last_tweet == 0)
$content .= "Never tweeted";
else
$content .= twitter_date('l jS F Y', $last_tweet);
$content .= "</span>";
$rows[] = array('data' => array(array('data' => theme('avatar', theme_get_avatar($user)), 'class' => 'avatar'),
array('data' => $content, 'class' => 'status shift')),
'class' => 'tweet');
}
$content = theme('table', array(), $rows, array('class' => 'followers'));
if (!$hide_pagination)
$content .= theme('list_pagination', $feed);
return $content;
}
いただきました問題です?それは動作し、動作しません。
$フィード繊維> users->ユーザーは何ですか? – RiaD
'foreach'の前に' var_dump($ feed) 'を置いて、渡される変数の種類を確認します。これらのパスの1つでは、適切なフィードを受け取らない可能性があります。これは、Twitterからの不適切な応答など、接続リンク上の何らかの原因によるものです。 – Naltharial