我已经使用了register_activation_hook,但它没有用。
<?php
/*
* Plugin Name: practice
* Plugin URI: http://ramguiao.tk
* Description: practice
* Version: 1.0
* Author: Ram Guiao
* Author URI: http://ramguiao.tk
*/
register_activation_hook(_FILE_,"showMessage");
function showMessage(){
echo "activated";
}
&GT;
谢谢!
答案 0 :(得分:3)
变化:
register_activation_hook(_FILE_,"showMessage");
要:
register_activation_hook(__FILE__,"showMessage");