2013-07-09 84 views
0

我正在编写一个WordPress插件。当我使用的功能register_activation_hook,我得到以下错误:为什么在调用register_activation_hook时会出现意外的输出错误?

The plugin generated 28 characters of unexpected output during activation. 
If you notice "headers already sent" messages, 
problems with syndication feeds or other issues, 
try deactivating or removing this plugin. 

相关代码:头被发送之前

register_activation_hook(__FILE__, function(){ 
echo "<script>alert('ok')</script>"; 
}); 
+0

您的激活挂钩正在输出

相关问题