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

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

      <tfoot id='tnmwy'></tfoot>
    1. <legend id='tnmwy'><style id='tnmwy'><dir id='tnmwy'><q id='tnmwy'></q></dir></style></legend>

      如何扩展 Joomla!到我的自定义 PHP 文件

      How to extend Joomla! to my custom PHP file(如何扩展 Joomla!到我的自定义 PHP 文件)
    2. <tfoot id='iExQ9'></tfoot>
        <bdo id='iExQ9'></bdo><ul id='iExQ9'></ul>

        • <small id='iExQ9'></small><noframes id='iExQ9'>

                <tbody id='iExQ9'></tbody>

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

                <legend id='iExQ9'><style id='iExQ9'><dir id='iExQ9'><q id='iExQ9'></q></dir></style></legend>
                本文介绍了如何扩展 Joomla!到我的自定义 PHP 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我创建了一个 php 文件.我想扩展所有的 Joomla!类到该文件.或者我至少希望能够使用 Joomla 的类来访问我的 PHP 文件中的数据库.我怎样才能以这种方式扩展功能?提前致谢.

                I have a php file i created. I want to extend all the Joomla! classes to that file. Or i at least want to be able to use Joomla's class for accessing the database within my PHP file. How can I extend the functionality that way? Thanks in advance.

                推荐答案

                将这些行放在 php 文件的顶部

                put these lines on top of your php file

                define( '_JEXEC', 1 );
                define('JPATH_BASE', dirname(__FILE__).'/../../../../' );   // should point to joomla root
                define( 'DS', DIRECTORY_SEPARATOR );
                require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
                require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
                $mainframe =& JFactory::getApplication('site');
                $mainframe->initialise();
                

                现在你可以在这里使用所有的 joomla 类

                now you can use all joomla classes here

                这篇关于如何扩展 Joomla!到我的自定义 PHP 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                get a # from a url in php(从 php 中的 url 获取 #)
                PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)

                <small id='8udpx'></small><noframes id='8udpx'>

                    <bdo id='8udpx'></bdo><ul id='8udpx'></ul>

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