Home Forums Weaver Xtreme Theme PHP and require_once Reply To: PHP and require_once


Still waiting for tomorrow to run down your checklist, but for now did a little experiment:

  1. New page.
  2. Only two lines are below.
  3. The function testit was added to the require_once file and does the same echo statement
  4. Both execute

So,  the production file in require_once, which has been untouched since March (IIRC) is loading fine providing the embedded code between [php][/php] is on one line, and yes, the page set to the raw template.

But notice the warning being produced by WP file. To make sure this wasn’t from my code, I created a new file for require_once that only had the testit line (e.g., for foreach statements to be found) and the error persists.

So, at very least, we have one Xtreme issues: it does not parse milti-line PHP code sets as documented on the Weaver Xtreme Plus Administration page.

But I suspect it may be causing this warning as well.

[php]require_once ‘php/glob.php’;testit;[/php]
[php]echo ‘<h2>This is the embedded h2 tag</h2>’[/php]