// 得到指定的一条记录
function fetchOne($sql, $result_type = MYSQL_ASSOC) {
if (!($result = mysql_query($sql))) {
$this -> err($sql . "<br>" . mysql_errno() . ":" . mysql_error());
} else {
$row = mysql_fetch_array($result, $result_type);
return $row;
}
}
function fetchOne($sql, $result_type = MYSQL_ASSOC) {
if (!($result = mysql_query($sql))) {
$this -> err($sql . "<br>" . mysql_errno() . ":" . mysql_error());
} else {
$row = mysql_fetch_array($result, $result_type);
return $row;
}
}
2017-05-11
$link = mysql_connect(DB_HOST, DB_USER, DB_PWD) or die("数据库连接失败 Error:" . mysql_errno() . ":" . mysql_error());
mysql_set_charset(DB_CHARSET);
mysql_select_db(DB_DBNAME) or die("指定数据库打开失败");
return $link;
mysql_set_charset(DB_CHARSET);
mysql_select_db(DB_DBNAME) or die("指定数据库打开失败");
return $link;
2017-05-11
最新回答 / GCYangXiXi
在你的url后面加上?controller=xxx&method=xxx,,比如http://localhost.test.php?controller=xxx&method=xxxxxx是你想访问的控制器或方法名
2017-05-04
Fatal error: Call to undefined function C() in F:\xampp\htdocs\MyProject\thinkphp\yytpdemo\index.php on line 17
可是明明已经引入了啊。。。
//引入封装的方法文件
//require_once ('Application/Home/php/function.php');
require './Application/Home/php/function.php';
可是明明已经引入了啊。。。
//引入封装的方法文件
//require_once ('Application/Home/php/function.php');
require './Application/Home/php/function.php';
2017-05-04
Notice: Undefined index: controller in F:\xampp\htdocs\MyProject\thinkphp\yytpdemo\index.php on line 15
Notice: Undefined index: method in F:\xampp\htdocs\MyProject\thinkphp\yytpdemo\index.php on line 16
Notice: Undefined index: method in F:\xampp\htdocs\MyProject\thinkphp\yytpdemo\index.php on line 16
2017-05-04