I've not done this in a "standalone" file, but if it was internal I'd say lose the "J" in JFactory" and add the lineabove that line.
That might be enough.
Incidentally, for a long (looong) time now, PHP deals with a directory separator character in a string in the platform appropriate way, so you can write&tc and lose the definition of DS.
Code:
use Joomla\CMS\Factory
That might be enough.
Incidentally, for a long (looong) time now, PHP deals with a directory separator character in a string in the platform appropriate way, so you can write
Code:
require_once ( JPATH_BASE .'\includes\defines.php' );
Statistics: Posted by MarkRS — Mon Jun 03, 2024 8:42 am