我在我的Joomla網站添加了一個新目錄時:更改URI後綴的Joomla添加子PHP頁面
,我已在該目錄中添加的index.php
這裏是代碼
define('_JEXEC', 1);
define('JPATH_BASE', '..');
define('DS', DIRECTORY_SEPARATOR);
require_once ('../includes/defines.php');
require_once ('../includes/framework.php');
//JDEBUG ? $_PROFILER->mark('afterLoad') : null;
/**
* CREATE THE APPLICATION
*
* NOTE :
*/
$mainframe =& JFactory::getApplication('site');
$template_name = $mainframe->getTemplate();;
$mainframe->initialise();
JPluginHelper::importPlugin('system');
/**
* ROUTE THE APPLICATION
*
* NOTE :
*/
$mainframe->route();
// authorization
$Itemid = JRequest::getInt('Itemid');
$mainframe->authorize($Itemid);
// trigger the onAfterRoute events
//JDEBUG ? $_PROFILER->mark('afterRoute') : null;
//$mainframe->triggerEvent('onAfterRoute');
/**
* DISPATCH THE APPLICATION
*
* NOTE :
*/
$option = JRequest::getCmd('option');
//$mainframe->dispatch($option);
// trigger the onAfterDispatch events
//JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
//$mainframe->triggerEvent('onAfterDispatch');
/**
* RENDER THE APPLICATION
*
* NOTE :
*/
$mainframe->render();
/**
* RETURN THE RESPONSE
*/
var_dump($document->getHeadData());
echo JResponse::toString($mainframe->getCfg('gzip'));
sdwdwd wdwd
當我在瀏覽器中查看此頁面時,所有動態鏈接(如CSS,JS和圖像)都以/ xxx /作爲後綴,使它們斷開!
如何刪除此後綴或如何將此後綴從/ xxx更改爲/指向原始文件位置?
我已經嘗試設置JDocument :: setBase,也試圖與JURI對象玩,改變了_path和_uri沒有任何變化
感謝