小编ars*_*lan的帖子

什么是JHtml :: _?

以下是我试图了解joomla MVC主题发展的代码

protected function getOptions() 
    {
            $db = JFactory::getDBO();
            $query = $db->getQuery(true);
            $query->select('id,greeting');
            $query->from('#__helloworld');
            $db->setQuery((string)$query);
            $messages = $db->loadObjectList();
            $options = array();
            if ($messages)
            {
                    foreach($messages as $message) 
                    {
                            $options[] = JHtml::_('select.option', $message->id, $message->greeting);
                    }
            }
            $options = array_merge(parent::getOptions(), $options);
            return $options;
    }
Run Code Online (Sandbox Code Playgroud)

我无法理解以下声明

JHtml::_('select.option', $message->id, $message->greeting);
Run Code Online (Sandbox Code Playgroud)

什么是JOMML类joomla的基本目的

joomla

9
推荐指数
1
解决办法
1万
查看次数

$ input-> getCmd('task')JOOMLA中的'task'是什么

我在JOOMLA挖掘这段代码

$input = JFactory::getApplication()->input;
$controller->execute($input->getCmd('task'));
Run Code Online (Sandbox Code Playgroud)

80%我理解但坚持'任务'的事情.

文档说getCMD

* The default behaviour is fetching variables depending on the
 * current request method: GET and HEAD will result in returning
 * an entry from $_GET, POST and PUT will result in returning an
 * entry from $_POST.
 *
 * You can force the source by setting the $hash parameter:
 *
 * post    $_POST
 * get     $_GET
 * files   $_FILES
 * cookie  $_COOKIE
 * env     $_ENV
 * server  $_SERVER
 * method  via current …
Run Code Online (Sandbox Code Playgroud)

joomla joomla-extensions joomla-component joomla2.5

3
推荐指数
1
解决办法
3613
查看次数

JOOMLA 网站速度太慢

我的 Joomla 网站太慢了。加载主页大约需要 8 到 10 秒。我正在使用xampp。模板原恒星。PC 核心 i7。操作系统窗口。JOOMLA 3.15。正常吗??

或者任何人都可以指导我如何调试这个问题。

Chrome 开发者网络选项卡的快照

apache xampp joomla joomla2.5 joomla3.0

2
推荐指数
1
解决办法
5999
查看次数