0
我使用Joomla 3加载的Joomla模块在外部PHP页面
我想补充我的Joomla模块,一个单独的(从的Joomla)PHP页面。这可能吗?
从我能在网上找到的东西,我需要调用joomla框架,然后???????然后它工作。
<?php define('_JEXEC', 1);
define('JPATH_BASE', dirname(__FILE__));
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();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<jdoc:include type="modules" name="position-22" style="none" />
</body>
</html>
你可以看一下error.php页面的例子。 – Elin