Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php RSS-显示图像,而不是存储模块?_Php_Mysql_Rss - Fatal编程技术网

Php RSS-显示图像,而不是存储模块?

Php RSS-显示图像,而不是存储模块?,php,mysql,rss,Php,Mysql,Rss,我已经为我的网站制作了一个rss提要,但是现在这个提要并不是真的显示一个图像,而是一个指向图像的链接作为一个附件。我想知道我需要做些什么更改,以便我可以在rss提要中实际显示图像 echo ' <item> <title>'.html_entity_decode($gag[story], ENT_COMPAT, "UTF-8").' - '.$thesitename.'</title> <description&

我已经为我的网站制作了一个rss提要,但是现在这个提要并不是真的显示一个图像,而是一个指向图像的链接作为一个附件。我想知道我需要做些什么更改,以便我可以在rss提要中实际显示图像

echo '  
   <item>  
      <title>'.html_entity_decode($gag[story], ENT_COMPAT, "UTF-8").' - '.$thesitename.'</title>  
      <description><![CDATA['.html_entity_decode($gag[story], ENT_COMPAT, "UTF-8").']]></description>  
      <link>'.$thebaseurl.'/post/'.$gag[PID].'</link>  
      <guid>'.$thebaseurl.'/post/'.$gag[PID].'/</guid>';
      if($gag[pic] != ""){echo '
      <enclosure type="image/jpeg" url="'.$thebaseurl.'/pdata/t/'.$gag[pic].'" length="1" />';


      }
echo  '
echo'
.html_entity_decode($gag[story],ENT_COMPAT,“UTF-8”)。-“$thesitename。”
“.$thebaseurl./post/”.$gag[PID]。”
“.$thebaseurl./post/”.$gag[PID]./”;
如果($gag[pic]!=“”){echo'
';
}
回声'

您的长度为“1”。这需要是图像的字节大小。您是说长度必须指定图像的特定字节才能显示它,还是我只是将其设置为更高的值?根据这一点:-是。然而,还有一种选择。如果愿意,可以将图像(使用标准HTML)嵌入
中的
标记中。您也可以尝试删除
length
属性。比包含错误的内容(如1或太高的值)要好得多。