求新浪sae数据库连接信息怎么填写 10
<?phpreturnarray('DB_TYPE'=>'mysql','DB_HOST'=>'localhost','DB_PORT'=>'3306','DB_NAME...
<?php
return array(
'DB_TYPE'=>'mysql',
'DB_HOST'=>'localhost',
'DB_PORT'=>'3306',
'DB_NAME'=>'viidb',
'DB_USER'=>'root',
'DB_PWD'=>'root',
'DB_PREFIX'=>'tp_',
);
这个就是配置文件和新浪数据库信息截图!我怎么填啊!
<?php
$mysql = new SaeMysql();
$sql = "SELECT * FROM `user` LIMIT 10";
$data = $mysql->getData( $sql );
$name = strip_tags( $_REQUEST['name'] );
$age = intval( $_REQUEST['age'] );
$sql = "INSERT INTO `user` ( `name` , `age` , `regtime` ) VALUES ( '" . $mysql->escape( $name ) . "' , '" . intval( $age ) . "' , NOW() ) ";
$mysql->runSql( $sql );
if( $mysql->errno() != 0 )
{
die( "Error:" . $mysql->errmsg() );
}
$mysql->closeDb();
?> 展开
return array(
'DB_TYPE'=>'mysql',
'DB_HOST'=>'localhost',
'DB_PORT'=>'3306',
'DB_NAME'=>'viidb',
'DB_USER'=>'root',
'DB_PWD'=>'root',
'DB_PREFIX'=>'tp_',
);
这个就是配置文件和新浪数据库信息截图!我怎么填啊!
<?php
$mysql = new SaeMysql();
$sql = "SELECT * FROM `user` LIMIT 10";
$data = $mysql->getData( $sql );
$name = strip_tags( $_REQUEST['name'] );
$age = intval( $_REQUEST['age'] );
$sql = "INSERT INTO `user` ( `name` , `age` , `regtime` ) VALUES ( '" . $mysql->escape( $name ) . "' , '" . intval( $age ) . "' , NOW() ) ";
$mysql->runSql( $sql );
if( $mysql->errno() != 0 )
{
die( "Error:" . $mysql->errmsg() );
}
$mysql->closeDb();
?> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询