The biggest problem, however, is that when using JRoute, a bug comes out.
Code: Select all
Error displaying the error page: Application Instantiation Error: Application Instantiation Error
Code: Select all
define('_JEXEC', 1);
define('JPATH_BASE', realpath(dirname(__FILE__).'/')); // print this out or observe errors to see which directory you should be in (this is two subfolders in)
define('DS', DIRECTORY_SEPARATOR);
require_once (JPATH_BASE.DS.'includes'.DS.'defines.php');
require_once (JPATH_BASE.DS.'includes'.DS.'framework.php');
require_once (JPATH_BASE.DS.'configuration.php');
require_once (JPATH_BASE.DS.'libraries'.DS.'joomla'.DS.'database'.DS.'database.php');
require_once (JPATH_BASE.DS.'libraries'.DS.'import.php');
global $config;
$config = new JConfig();
$db_driver = $config->dbtype; // Database driver name
$db_host = $config->host; // Database host name
$db_user = $config->user; // User for database authentication
$db_pass = $config->password; // Password for database authentication
$db_name = $config->db; // Database name
$db_prefix = $config->dbprefix; // Database prefix (may be empty)
Code: Select all
JRoute::_('index.php?option=com_content&view=article&id='.$item->id);