最新回答 / Candy_cans
要把css引用的文件夹img放在和PC.php同级的目录文件夹下面因为看似HTML文件的路径在tpl文件夹下面,但是实际上是被include在PC.php里了。
2017-05-14
使用PHP调用Smarty显示时 HTML模板当中的css没有显示布局改变 有方法解决么 直接打开HTML就能正常显示
2017-05-14
// 记录的删除操作
function delete($table, $where = null) {
$where = ($where == null)? null : " where " . $where;
$sql = "delete from {$table} {$where}";
mysql_query($sql);
return mysql_affected_rows();
}
function delete($table, $where = null) {
$where = ($where == null)? null : " where " . $where;
$sql = "delete from {$table} {$where}";
mysql_query($sql);
return mysql_affected_rows();
}
2017-05-11
// 完成记录的插入操作
function insert($table, $array) {
$keys = join(",", array_keys($array));
$vals = "'" . join("','", array_values($array)) . "'";
$sql = "insert {$table}($keys) values({$vals})";
mysql_query($sql);
return mysql_insert_id();
}
function insert($table, $array) {
$keys = join(",", array_keys($array));
$vals = "'" . join("','", array_values($array)) . "'";
$sql = "insert {$table}($keys) values({$vals})";
mysql_query($sql);
return mysql_insert_id();
}
2017-05-11
// 得到指定的一条记录
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