本文整理汇总了PHP中JHtml::addincludepath方法的典型用法代码示例。如果您正苦于以下问题:PHP JHtml::addincludepath方法的具体用法?PHP JHtml::addincludepath怎么用?PHP JHtml::addincludepath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JHtml
的用法示例。
在下文中一共展示了JHtml::addincludepath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
<?php
/**
* @package Projectfork
* @subpackage Forum
*
* @author Tobias Kuhn (eaxs)
* @copyright Copyright (C) 2006-2012 Tobias Kuhn. All rights reserved.
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL, see LICENSE.txt
*/
defined('_JEXEC') or die;
// Access check
if (!JFactory::getUser()->authorise('core.manage', 'com_pfforum')) {
return JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR'));
}
// Include dependencies
jimport('joomla.application.component.controller');
jimport('joomla.application.component.helper');
jimport('projectfork.framework');
// Register classes to autoload
JLoader::register('PFforumHelper', JPATH_ADMINISTRATOR . '/components/com_pfforum/helpers/pfforum.php');
JHtml::addincludepath(JPATH_ADMINISTRATOR . '/components/com_pfforum/helpers/html');
$controller = JControllerLegacy::getInstance('PFforum');
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();