📄 updata.php
字号:
<?php
function getip() {
$IP=getenv('REMOTE_ADDR');
$IP_ = getenv('HTTP_X_FORWARDED_FOR');
if (($IP_ != "") && ($IP_ != "unknown")) $IP=$IP_;
return $IP;
}
require('config.php');
$name=$_POST['user_name'];
$ip=getip();
$info=$_POST['post_info'];
$title=$_POST['post_title'];
$time=date("Y-m-d H:i:s");
$conn=mysql_connect($host,$user,$password);
mysql_query("set names GB2312"); //解决中文乱码问题
mysql_select_db($db);
$exec="insert into gbooktable (name,ip,title,info,time) values ('$name','$ip','$title','$info','$time')";
$result=mysql_query($exec);
mysql_close();
header("location:index.php");
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -