2013-07-09 34 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

您的激活掛鉤正在輸出

相關問題