Search
Other Sourcerer questions
Forum

tried for 3 hours before asking: issues with includes for php

Michael S Scheidell's Avatar Michael S Scheidell
yes, {source}<?php echo 'TEST'; ?>{/source} works
yes, the file exists (if it didn't , i would get an error)
but it just SEEMS to treat the file as a text file, not executing php commands.
I know im doing something stupid, but iv tried wrapping with <?php tags, and it just prints the tags..

given this: (pro version, joomla 4.x latest)

with or without raw=true (I am using a wysi editor)
{source require_once="includes/include.php"}{/source}
created with '</>code'
it DOES include the file, the contents are
echo "I don't need php tags";

and this is the result: of:
{source}<?php echo 'TEST'; ?>{/source}
{source  require_once="includes/include.php"}{/source}

yes, i cleared joomla cache, yes, iv purged everthing in between testing. but if i can';t past this, i can't include functions. the biggest reason for buying pro was to try to keep the code clean, and not 400 lines i have to read through.

i don't know why it doesn;'t 'execute' echo.

TEST
echo "I don't need php tags";
Michael S Scheidell's Avatar Michael S Scheidell
it seems... that <source><?php require_once..... and all the include examples are confusing and I must be an idiot.
{source require_once="includes/include.php"}{/source}
STILL needs this in the file:

<?php
echo "I don't need php tags";
?>


why??
i am going to try passing vars to it now, but I think i failed at that.
Michael S Scheidell's Avatar Michael S Scheidell
similar issues with css.
so i need <switch> </switch> ? and I don't see the css in the source, no matter what I do.
Peter van Westen's Avatar Peter van Westen ADMIN
Sorry, but if you do not know how php (and css) works, then you shouldn't be using a tool like Sourcerer.

I have no idea what you mean with the <switch> tags.
Please post a rating at the Joomla! Extensions Directory
Michael S Scheidell's Avatar Michael S Scheidell
i know how it works, but your software doesn't
none of the pro stuff works like documented, and the free stuff works better.
Peter van Westen's Avatar Peter van Westen ADMIN
If you want to include a php file that contains php code, then yes, you need to place the <?php tags in there too. That is how php works. That doesn't have much to do with Sourcerer itself.

But hey, you are not happy with the Pro version, so I have issued a refund. You are welcome to use the free version, or look for a different solution if you need more.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription