Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1506

Joomla! 5.x Coding • Connect an external PHP file with Joomla 5

$
0
0

Code:

<?phpdefine('_JEXEC', 1);define('JPATH_BASE', __DIR__);require_once JPATH_BASE . '/includes/defines.php';require_once JPATH_BASE . '/includes/framework.php';require_once JPATH_BASE . '/plugins/authentication/joomla/src/Extension/Joomla.php';require_once JPATH_BASE . '/plugins/authentication/cookie/src/Extension/Cookie.php';$container = \Joomla\CMS\Factory::getContainer();$container->alias('session.web', 'session.web.site')    ->alias('session', 'session.web.site')    ->alias('JSession', 'session.web.site')    ->alias(\Joomla\CMS\Session\Session::class, 'session.web.site')    ->alias(\Joomla\Session\Session::class, 'session.web.site')    ->alias(\Joomla\Session\SessionInterface::class, 'session.web.site');$app = $container->get(\Joomla\CMS\Application\SiteApplication::class);\Joomla\CMS\Factory::$application = $app;?>
This is my "connector" file for an external PHP APP, but it doesn't work in Joomla 5
I need a new connector file.

HELP!

P.D. Chat GPT doesn't gave me the solution :(

Thanks a lot.

Statistics: Posted by BENKENOBI — Sun Dec 22, 2024 4:02 pm



Viewing all articles
Browse latest Browse all 1506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>