level 1
乞丐有形
楼主
如题:
UserAction.class.php
<?php
// 本类由系统自动生成,仅供测试用途
class UserAction extends Action {
public function index() {
}
public function add() {
$this->display();
}
public function insert() {
$user = new UserModel();
if ($data = $user->create()) {
if (FALSE !== $user->add()) {
$userid = $user->getLastInsID();
echo "创建成功!" . $userid;
} else {
echo "创建失败" . $user->getDbError();
}
} else {
echo $user->getError();
}
}
}
?>
2012年07月27日 06点07分
1
UserAction.class.php
<?php
// 本类由系统自动生成,仅供测试用途
class UserAction extends Action {
public function index() {
}
public function add() {
$this->display();
}
public function insert() {
$user = new UserModel();
if ($data = $user->create()) {
if (FALSE !== $user->add()) {
$userid = $user->getLastInsID();
echo "创建成功!" . $userid;
} else {
echo "创建失败" . $user->getDbError();
}
} else {
echo $user->getError();
}
}
}
?>