admin管理员组

文章数量:1332389

I create test plugin for learn purpose. i face this error on plugin activation.

error: The plugin generated 227 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.

my php file:

<?php
  if(!class_exists('my_class')):
class my_class{
    public function __construct(){
       
    }
    function activation()
    {
        echo "activaton function is called on activation";
    }
   
  
}



new my_class;

register_activation_hook(__FILE__, array('my_class','activation'));

endif;


?>

本文标签: