I'm trying to introduce a simple php in a custom html module and it doesn't let me do it.Why?
This is the code:
<p> </p>
< ? php
echo " Hello World" . "\n";
?>
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.
Sign up to join this communityBy default, Joomla doesn't allow you to use PHP in the editor. You will need to download a 3rd party extension to allow this feature. I would strongly recommend Sourcerer.
Once installed, simply wrap your code around {source}
tags like so:
{source}
<?php
echo " Hello World" . "\n";
?>
{/source}
<?php
, not< ? php