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

Joomla! 4.x Coding • Re: accessing Joomla 4 From PHP

$
0
0
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 line

Code:

use Joomla\CMS\Factory
above 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

Code:

require_once ( JPATH_BASE .'\includes\defines.php' );
&tc and lose the definition of DS.

Statistics: Posted by MarkRS — Mon Jun 03, 2024 8:42 am



Viewing all articles
Browse latest Browse all 1596

Trending Articles





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