Hi there!
I'm using Revo 2.3.3.
SITUATION
I have a folder on the root (/catalog/) that has some PHP files. These PHP files have some HTML in them; for instance:
search.php:
<?php
$name="Joe";
?>
<a href="<?php echo $name; ?>">Hi!</a>
I also have a snippet that requires search.php:
modx snippet:
<?php
require_once('search.php');
?>
THE ISSUE
When loading the page that calls the snippet, it renders the HTML first from the search.php file. Only once is the HTML rendered that it will run the PHP part of search.php. Basically, it's acting as if you had
echo "Well howdy there!" in a snippet. Is there any way to avoid that without modifying search.php?
FAILED ATTEMPT TO SOLVE THIS ISSUE
I tried creating a static resource linked to the search.php page, however the same thing happened.
Any help would be greatly appreciated. Thank you!
Jean-Marc