自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

The_Reader的博客

区块链从零到精通

  • 博客(5)
  • 收藏
  • 关注

原创 Beego ———— orm实现获取数据并写入到数据库中

 新建一个controller文件,当用户访问http://localhost:8080/registe这个地址时 提交get,get方法返回一个页面让用户填写数据并post提交,post获得数据,并解析,我写了两种方式,一个是,根据关键词,并初始化一个新的结构体,让其插入到数据库中,package controllersimport ( "github.com/astaxie/bee...

2018-08-30 22:16:55 3043

原创 Beego ———— 从浏览器中获取文件

 新建一个controller  实现对文件的获取并保存功能package controllersimport ( "github.com/astaxie/beego" "fmt" "strings")type Demo3Controller struct { beego.Controller}func (this *Demo3Controller)Getfile()...

2018-08-30 22:13:59 1747

原创 Beego ———— 从浏览器中获取string数据

创建一个controller文件并在路由中注册package controllersimport ( "github.com/astaxie/beego" "fmt" "strings")type Demo3Controller struct { beego.Controller}func (this *Demo3Controller)Getstring(){ u...

2018-08-30 22:12:03 1488

原创 Beego ———— 输出json和xml类型数据

首先新建一个controllerpackage controllersimport ( "github.com/astaxie/beego")type Demo2Controller struct { beego.Controller}type Person struct { Name string Nickname string password stri...

2018-08-30 22:07:22 1417

原创 Beego ———— cookie

cookie首先新建一个controllerpackage controllersimport "github.com/astaxie/beego"type Demo1Controller struct { beego.Controller}func (this *Demo1Controller)Get(){ //获取cookie没有就set username...

2018-08-30 22:00:56 615

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除