// 获取某款软件在线人数
function getOnlineNum($sid){
// 引用全局变量 $time=时间戳 $pre=表头
global $time,$pre;
// 获取在线人数
$online = dbSqlFindOne("select count(*) as num from `{$pre}user_online` where `sid`='{$sid}' and {$time}-`lastonline` < `heartbeatTime`");
// 返回查询结果
return $online['num'];
}
char tmp[100];
hwd_callPHP("getOnlineNum",'软件sid', tmp, 100);
OutputDebugString(tmp);
在线人数 = 护卫盾_调用PHP函数("getOnlineNum",'软件sid')