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

        <small id='r17tx'></small><noframes id='r17tx'>

      2. <tfoot id='r17tx'></tfoot>
      3. 如何通过 Joomla 中的文章 ID 获取文章文本?

        时间:2023-10-11
        <tfoot id='yaHMN'></tfoot>

              <small id='yaHMN'></small><noframes id='yaHMN'>

                <bdo id='yaHMN'></bdo><ul id='yaHMN'></ul>

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

                  本文介绍了如何通过 Joomla 中的文章 ID 获取文章文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想通过从 joomla 模板传递文章 ID 来获取文章文本.

                  I want to get article text by passing article ID from the joomla template.

                  推荐答案

                  简单,提供您发送带有 post/get 的文章 id 并使用变量id"作为其编号:

                  Simple, providing you sending an article id with post/get and using variable "id" as its number:

                  $articleId = JRequest::getInt('id');
                  $db =& JFactory::getDBO();
                  
                  $sql = "SELECT fulltext FROM #__content WHERE id = ".intval($articleId);
                  $db->setQuery($sql);
                  $fullArticle = $db->loadResult();
                  
                  if(!strlen(trim($fullArticle))) $fullArticle = "Article is empty ";
                  

                  从任何地方获取文章 ID:

                  to get articleId from anywhere:

                  $articleId = (JRequest::getVar('option')==='com_content' && JRequest::getVar('view')==='article')? JRequest::getInt('id') : 0;
                  

                  这篇关于如何通过 Joomla 中的文章 ID 获取文章文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:joomla spambots 错误 下一篇:Joomla 3.X - 从标题中删除工具提示脚本?

                  相关文章

                  • <bdo id='WKJgh'></bdo><ul id='WKJgh'></ul>
                • <small id='WKJgh'></small><noframes id='WKJgh'>

                  <legend id='WKJgh'><style id='WKJgh'><dir id='WKJgh'><q id='WKJgh'></q></dir></style></legend><tfoot id='WKJgh'></tfoot>

                    <i id='WKJgh'><tr id='WKJgh'><dt id='WKJgh'><q id='WKJgh'><span id='WKJgh'><b id='WKJgh'><form id='WKJgh'><ins id='WKJgh'></ins><ul id='WKJgh'></ul><sub id='WKJgh'></sub></form><legend id='WKJgh'></legend><bdo id='WKJgh'><pre id='WKJgh'><center id='WKJgh'></center></pre></bdo></b><th id='WKJgh'></th></span></q></dt></tr></i><div id='WKJgh'><tfoot id='WKJgh'></tfoot><dl id='WKJgh'><fieldset id='WKJgh'></fieldset></dl></div>