Discuz getattachnewaid函数 添加一个新的附件索引记录,并返回新附件 ID
- /** * 添加一个新的附件索引记录,并返回新附件 ID * @param <int> $uid */function getattachnewaid($uid = 0) { global $_G; $uid = !$uid ? $_G['uid'] : $uid; return C::t('forum_attachment')->insert(array('tid' => 0, 'pid' => 0, 'uid' => $uid, 'tableid' => 127), true);}