久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

        <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="qwawimqqmiuu" 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="qwawimqqmiuu" 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="qwawimqqmiuu" id='MJ7Ye'><tfoot id='MJ7Ye'></tfoot><dl id='MJ7Ye'><fieldset id='MJ7Ye'></fieldset></dl></div>

                          • <tfoot id='MJ7Ye'></tfoot>
                          • 主站蜘蛛池模板: 成人国产精品入口免费视频 | 在线观看日本高清二区 | 午夜伦理影院 | 中文视频在线 | 亚洲精品www | 精品久久ai电影 | 精品一区av| 人人草人人干 | 欧美在线二区 | 欧美一级做性受免费大片免费 | 超碰高清 | 精品电影 | 欧美精品第一区 | 欧美性成人 | 欧美一区二区三区视频 | 特级a欧美做爰片毛片 | 色婷婷精品国产一区二区三区 | 成人一区二区视频 | 美女视频h| 午夜小视频免费观看 | 99re视频| 久久久亚洲一区 | 在线观看中文字幕 | www.毛片| 国产99久久精品 | 中文字幕一区二区三区不卡 | 成人一区二区三区 | 久草免费在线 | 四虎影院欧美 | av国产精品| 亚洲成网 | 欧美一区精品 | 国产91中文| 国产精品久久久久久网站 | 草在线| 伊人伊人伊人 | 成人精品鲁一区一区二区 | 一级毛片在线播放 | 米奇成人网 | 欧美日韩高清免费 | 影音先锋久久 |