大家好,我想实现用php自动发送消息,当用户完成一些操作,然后系统触发后,发送消息给管理员(也就是我老人家),从而知道用户进行了该 操作,在网上找了一堆教程后,发现,收不到,不知道是哪里错了,请懂php代码 的前辈指点一下,先谢谢了!
<?php
define("WWWROOT",str_ireplace(str_replace("/","\\",$_SERVER['PHP_SELF']),'',__FILE__)."\\");
require (WWWROOT.'dz_3.4\source\class\class_core.php');
//require (WWWROOT.'dz_3.4\source\function\function_core.php');
$discuz = & discuz_core::instance();
$discuz->cachelist = $cachelist;
$discuz->init();
global $_G;
if($_G['uid'])
{
function notification_add($touid, $type, $note, $notevars = array(), $system = 0) {
return helper_notification::notification_add($touid, $type, $note, $notevars, $system);
}
$uid=1;
notification_add($uid,'system',$_POST['message'],'dfdfdfdfdsfsdf', 1);
}
?>
|