pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

        <tfoot id='m0MP1'></tfoot>
      1. <small id='m0MP1'></small><noframes id='m0MP1'>

      2. <i id='m0MP1'><tr id='m0MP1'><dt id='m0MP1'><q id='m0MP1'><span id='m0MP1'><b id='m0MP1'><form id='m0MP1'><ins id='m0MP1'></ins><ul id='m0MP1'></ul><sub id='m0MP1'></sub></form><legend id='m0MP1'></legend><bdo id='m0MP1'><pre id='m0MP1'><center id='m0MP1'></center></pre></bdo></b><th id='m0MP1'></th></span></q></dt></tr></i><div class="hlpx77x" id='m0MP1'><tfoot id='m0MP1'></tfoot><dl id='m0MP1'><fieldset id='m0MP1'></fieldset></dl></div>

          <bdo id='m0MP1'></bdo><ul id='m0MP1'></ul>
      3. <legend id='m0MP1'><style id='m0MP1'><dir id='m0MP1'><q id='m0MP1'></q></dir></style></legend>

      4. SimplePie 可以從提要中抓取圖像嗎

        Can SimplePie grab images from feeds(SimplePie 可以從提要中抓取圖像嗎)

            <tfoot id='Dt6Nq'></tfoot>
          • <small id='Dt6Nq'></small><noframes id='Dt6Nq'>

              • <bdo id='Dt6Nq'></bdo><ul id='Dt6Nq'></ul>

              • <i id='Dt6Nq'><tr id='Dt6Nq'><dt id='Dt6Nq'><q id='Dt6Nq'><span id='Dt6Nq'><b id='Dt6Nq'><form id='Dt6Nq'><ins id='Dt6Nq'></ins><ul id='Dt6Nq'></ul><sub id='Dt6Nq'></sub></form><legend id='Dt6Nq'></legend><bdo id='Dt6Nq'><pre id='Dt6Nq'><center id='Dt6Nq'></center></pre></bdo></b><th id='Dt6Nq'></th></span></q></dt></tr></i><div class="vrfnbft" id='Dt6Nq'><tfoot id='Dt6Nq'></tfoot><dl id='Dt6Nq'><fieldset id='Dt6Nq'></fieldset></dl></div>
              • <legend id='Dt6Nq'><style id='Dt6Nq'><dir id='Dt6Nq'><q id='Dt6Nq'></q></dir></style></legend>

                    <tbody id='Dt6Nq'></tbody>
                  本文介紹了SimplePie 可以從提要中抓取圖像嗎的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在使用這個 simplepie,并且已將文件上傳到我的主機.除了一件事外,一切似乎都運行良好.我從中獲取提要的博客中有圖像,當我使用 simplepie 查看提要時,圖像不顯示.當我使用 simplepie 查看博客時,有沒有辦法讓圖像顯示出來?

                  I am using this simplepie and i have uploaded the files to my host. Everything seems to be working fine except one thing. The blog that i'm getting the feed from has images in it, and when i use the simplepie to view the feed, the images don't show up. Is there a way to get the images to show up when i view the blog with simplepie?

                  好的,對不起,我是新手.我只是直接使用網站上的代碼來嘗試查看博客.我會把代碼放在這里的底部.所以是的,就像我說的那樣,我只是想讓圖像顯示在我正在閱讀的博客上.除了那個之外,一切都很好.

                  Okay i am sorry, i am new at this. I am just using the code straight from the website to try and view the blog. i will put the code at the bottom here. So yea like i said i'm just trying to get the images to show up that are on the blog i'm reading from. Everything shows up great except that.

                  --- 頭信息---

                  <?php
                  
                  // Make sure SimplePie is included. You may need to change this to match the location of simplepie.inc.
                  require_once('simplepie.inc');
                  
                  // We'll process this feed with all of the default options.
                  $feed = new SimplePie();
                  
                  // Set the feed to process.
                  $feed->set_feed_url('http://wordpress.homickdesign.com/feed/');
                  
                  // Run SimplePie.
                  $feed->init();
                  
                  // This makes sure that the content is sent to the browser as text/html and the UTF-8 character set (since we didn't change it).
                  $feed->handle_content_type();
                  
                  // Let's begin our XHTML webpage code.  The DOCTYPE is supposed to be the very first thing, so we'll keep it on the same line as the closing-PHP tag.
                  ?>
                  

                  --- 代碼---

                  <h2><a href="<?php echo $feed->get_permalink(); ?>"><?php echo $feed->get_description(); ?></a><br />
                        <span>Latest news from Robert Homick</span></h2>       
                  
                          <?php
                  $c=1;   
                  foreach ($feed->get_items() as $item):
                  if($c <= 3){
                  ?>
                  
                          <p><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a><br />
                          <?php echo $item->get_description(); ?><br />
                          <span>Posted on <?php echo $item->get_date('j F Y | g:i a'); ?></span><br />
                          <?php $c++;?>
                  
                  
                  <?php } endforeach;  ?>
                  

                  推薦答案

                  是的,您可以調用 get_content() 并將整個帖子或包含在提要中的帖子部分輸出到屏幕上,所有包括 HTML 標簽.如果你想拉出帖子中的第一張圖片,你必須做更多的工作,這是我一直在做的.

                  Yes, you can call get_content() and the entire post or the portion of the post that is included in the feed will be outputted to the screen, all the HTML tags included. If you want to pull say the first image in the post, you have to do a little more work, here is what I've been doing.

                  $htmlDOM = new simple_html_dom();
                  $htmlDOM->load($item->get_content());
                  $image = $htmlDOM->find('img', 0); 
                  $html .= '<img src="thumbnail.php?file=' . $image->src . '&maxw=300&maxh=300" border="0" />';
                  

                  我目前的小項目中的片段,使用 simple_html_dom 和另一個我從互聯網上獲取的腳本來即時調整圖像大小.如果您只想顯示圖像根本不調整其大小 $image->src 是 URL.我認為這樣的功能將來可能會添加到 SimplePie 或作為 SimplePie 的附加組件,但同時,顯示來自提要的項目的第一張圖像需要四行代碼.

                  That snippet from my current little project, uses simple_html_dom and another script I got off the Internet to resize images on the fly. If you just want to display the image not resize it at all $image->src is the URL. I think functionality like this may be added to SimplePie in the future or an add-on to SimplePie, but in the mean time, it is four lines of code to display the first image from an item from a feed.

                  這篇關于SimplePie 可以從提要中抓取圖像嗎的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                1. <small id='MJ7Ye'></small><noframes id='MJ7Ye'>

                        <legend id='MJ7Ye'><style id='MJ7Ye'><dir id='MJ7Ye'><q id='MJ7Ye'></q></dir></style></legend>
                            <tbody id='MJ7Ye'></tbody>
                            <bdo id='MJ7Ye'></bdo><ul id='MJ7Ye'></ul>
                          • <i id='MJ7Ye'><tr id='MJ7Ye'><dt id='MJ7Ye'><q id='MJ7Ye'><span id='MJ7Ye'><b id='MJ7Ye'><form id='MJ7Ye'><ins id='MJ7Ye'></ins><ul id='MJ7Ye'></ul><sub id='MJ7Ye'></sub></form><legend id='MJ7Ye'></legend><bdo id='MJ7Ye'><pre id='MJ7Ye'><center id='MJ7Ye'></center></pre></bdo></b><th id='MJ7Ye'></th></span></q></dt></tr></i><div class="hnzvr7d" id='MJ7Ye'><tfoot id='MJ7Ye'></tfoot><dl id='MJ7Ye'><fieldset id='MJ7Ye'></fieldset></dl></div>

                          • <tfoot id='MJ7Ye'></tfoot>
                          • 主站蜘蛛池模板: 阿里巴巴诚信通温州、台州、宁波、嘉兴授权渠道商-浙江联欣科技提供阿里会员办理 | 储气罐,真空罐,缓冲罐,隔膜气压罐厂家批发价格,空压机储气罐规格型号-上海申容压力容器集团有限公司 | 浙江宝泉阀门有限公司 | 耐酸碱胶管_耐腐蚀软管总成_化学品输送软管_漯河利通液压科技耐油耐磨喷砂软管|耐腐蚀化学软管 | Maneurop/美优乐压缩机,活塞压缩机,型号规格,技术参数,尺寸图片,价格经销商 | 深圳APP开发公司_软件APP定制开发/外包制作-红匣子科技 | 阿米巴企业经营-阿米巴咨询管理-阿米巴企业培训-广东键锋企业管理咨询有限公司 | 自动钻孔机-全自动数控钻孔机生产厂家-多米(广东)智能装备有限公司 | 档案密集柜_手动密集柜_智能密集柜_内蒙古档案密集柜-盛隆柜业内蒙古密集柜直销中心 | 深圳湾1号房价_深圳湾1号二手房源| 减速机三参数组合探头|TSM803|壁挂式氧化锆分析仪探头-安徽鹏宸电气有限公司 | 药品/药物稳定性试验考察箱-埃里森仪器设备(上海)有限公司 | 20年条刷老厂-条刷-抛光-工业毛刷辊-惠众毛刷 | 塑胶地板-商用PVC地板-pvc地板革-安耐宝pvc塑胶地板厂家 | 阜阳成人高考_阜阳成考报名时间_安徽省成人高考网 | 济南玻璃安装_济南玻璃门_济南感应门_济南玻璃隔断_济南玻璃门维修_济南镜片安装_济南肯德基门_济南高隔间-济南凯轩鹏宇玻璃有限公司 | PC构件-PC预制构件-构件设计-建筑预制构件-PC构件厂-锦萧新材料科技(浙江)股份有限公司 | 铝单板_铝窗花_铝单板厂家_氟碳包柱铝单板批发价格-佛山科阳金属 | 非小号行情 - 专业的区块链、数字藏品行情APP、金色财经官网 | 扒渣机,铁水扒渣机,钢水扒渣机,铁水捞渣机,钢水捞渣机-烟台盛利达工程技术有限公司 | KBX-220倾斜开关|KBW-220P/L跑偏开关|拉绳开关|DHJY-I隔爆打滑开关|溜槽堵塞开关|欠速开关|声光报警器-山东卓信有限公司 | 小型玉石雕刻机_家用玉雕机_小型万能雕刻机_凡刻雕刻机官网 | STRO|DTRO-STRO反渗透膜(科普)_碟滤 | 锥形螺带干燥机(新型耙式干燥机)百科-常州丰能干燥工程 | 魔方网-培训咨询服务平台| 山东PE给水管厂家,山东双壁波纹管,山东钢带增强波纹管,山东PE穿线管,山东PE农田灌溉管,山东MPP电力保护套管-山东德诺塑业有限公司 | 直流电能表-充电桩电能表-导轨式电能表-智能电能表-浙江科为电气有限公司 | 南方珠江-南方一线电缆-南方珠江科技电缆-南方珠江科技有限公司 南汇8424西瓜_南汇玉菇甜瓜-南汇水蜜桃价格 | 仿真植物|仿真树|仿真花|假树|植物墙 - 广州天昆仿真植物有限公司 | 干洗店加盟_洗衣店加盟_干洗店设备-伊蔻干洗「武汉总部」 | 中开泵,中开泵厂家,双吸中开泵-山东博二泵业有限公司 | 网站建设,北京网站建设,北京网站建设公司,网站系统开发,北京网站制作公司,响应式网站,做网站公司,海淀做网站,朝阳做网站,昌平做网站,建站公司 | atcc网站,sigma试剂价格,肿瘤细胞现货,人结肠癌细胞株购买-南京科佰生物 | 超声波清洗机_细胞破碎仪_实验室超声仪器_恒温水浴-广东洁盟深那仪器 | 北京宣传片拍摄_产品宣传片拍摄_宣传片制作公司-现像传媒 | 电磁铁_推拉电磁铁_机械手电磁吸盘电磁铁厂家-广州思德隆电子公司 | 玻璃瓶厂家_酱菜瓶厂家_饮料瓶厂家_酒瓶厂家_玻璃杯厂家_徐州东明玻璃制品有限公司 | 清水混凝土修复_混凝土色差修复剂_混凝土色差调整剂_清水混凝土色差修复_河南天工 | 压力控制器,差压控制器,温度控制器,防爆压力控制器,防爆温度控制器,防爆差压控制器-常州天利智能控制股份有限公司 | 模具钢_高速钢_不锈钢-万利钢金属材料 | 中直网_行业门户-行业人专业的交流平台!|