开发者 | Otto42 |
---|---|
更新时间 | 2022年3月31日 00:55 |
PHP版本: | 2.8 及以上 |
WordPress版本: | 5.9 |
版权: | GPLv2 |
版权网址: | 版权信息 |
<?php
and ?>
) for it to be recognized and executed.
Only users with the unfiltered_html role will be allowed to insert unfiltered HTML. This includes PHP code, so users without admin or editor permissions will not be able to use this to execute code, even if they have widget editing permissions.
That error means that your PHP code is incorrect or otherwise broken.
No, it's not. Really. This widget has no real errors in it, it's about the simplest widget one can possibly make. Any errors coming out of the "execphp.php" file are errors in code you put into one of the widgets. The reason that it shows the error being in the execphp.php file is because that is where your widget's code is actually being run. So, if it says that you have an error on line 27, I assure you, the problem is yours. Please don't email me about that error.
Code in a template runs in the global context. Code in the widget will run in a function context. Make sure that you declare any global variables as global before attempting to use them.