Ai
2 Star 2 Fork 1

闪电侠的右手/php网站实现文件上传管理
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
save.php 673 Bytes
一键复制 编辑 原始数据 按行查看 历史
fansOfTech 提交于 2018-03-11 20:01 +08:00 . first commit
<?php
include('db.php');
class input{ //获取msg页面post发送来的数据
function post($key){
$a=$_POST[$key];
return $a;
}
}
$b=new input(); //实例化对象
$user=$b->post('user');
$msg=$b->post('msg');
if($msg==''){
echo '留言内容不能为空';
exit;
}
if($user==''){
echo '用户名不能为空';
exit;
}
echo $user;
echo "</br>";
echo $msg;
echo "</br>";
$t=time();
$sql="INSERT INTO msg (`username`,`content`,`intime`) values('{$user}','{$msg}','{$t}')";
$is=$mysqli->query($sql);
if($is==true){
echo"插入成功";
}
else{
echo "插入失败";
}
echo "<script language='javascript'>;alert('欢迎$user');</script>";
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/shaoeric/php_web_site_implementation_of_file_upload_management.git
git@gitee.com:shaoeric/php_web_site_implementation_of_file_upload_management.git
shaoeric
php_web_site_implementation_of_file_upload_management
php网站实现文件上传管理
master

搜索帮助