【发布时间】:2019-04-10 04:19:11
【问题描述】:
我正在将我的 Joomla 2.5 网站迁移到 Joomla 3.3。
现在我正在努力加载 joomla 框架并在 phpbb 模板中显示一个模块。 使用以下代码在 Joomla 2.5 中加载 Joomla 框架可以正常工作:
define( '_JEXEC', 1 );
define('JPATH_BASE', '/var/customers/webs/tf2swiss/joomlasite');
define( 'DS', DIRECTORY_SEPARATOR );
require_once('../configuration.php');
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
require_once ( JPATH_BASE .DS.'libraries'.DS.'joomla'.DS.'factory.php' );
require( JPATH_LIBRARIES. '/import.php');
// Joomla! library imports
jimport( 'joomla.environment.uri' );
jimport( 'joomla.user.user');
jimport('joomla.application.module.helper');
/* Create the Application */
$mainframe =& JFactory::getApplication('site');
jimport('joomla.plugin.helper');
但我现在不能在 Joomla 3.x 中工作。页面停止加载此代码所在的位置。 在安全选项中启用在 phpbb 模板文件中使用 PHP。
有谁知道如何在外部文件中加载 joomla 3.x 框架?
【问题讨论】:
-
如果有人发现这实际上是在寻找如何加载 Joomla 1.5(是的,即使在 2017 年也使用过,尤其是在 dermert 中)...:docs.joomla.org/…
标签: php joomla joomla3.0 phpbb phpbb3