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


First of all, the ERROR STACK message indicates the error is in the PHP code you are trying to execute. It is NOT an error in any Weaver Xtreme Plus code. Note the eval()’d code part of the message. That means the error is in that code. The problem is in the eval()’d code.

If the code you supplied in the INSERTED CODE section is what you are trying, then there are a couple of problematic things.

First, your example has incorrect single-quotation marks – they are forward/backward sinlgle quotes – but this is likely a copy/paste issue with the way this forum handles quotes.

But the require_once ‘php/glob.php’; seems a bit questionable. The path to php/glob.php needs to be more complete. As it stands, it is dependent on the directory wp-content/plugins/weaver-xtreme-plus/includes, where weaver_xplus_shortcodes.php is located. So you should have a complete path to where the php/glob.php is found. And since the error output says the error was on line 1, that is the require_once.

I also don’ think that inserting a block of <script> code in the middle of page/post content will work as intended. WP will not emit <script> code directly- it would be escaped (e.g.: &lt;script&gt;).