摘要: 使用python搭建一个web服务器,然后使用python语言来开发后台服务。Flask是一个用Python编写的Web应用程序框架。常见的服务包括,包括http的各种类型请求,如get、post等常规请求。对于web开发,不同页面之间的跳转、数据传输通信、网页存储、缓存等是基础知识。 下面我们都使 阅读全文
posted @ 2021-11-19 22:30 suesky 阅读(3175) 评论(0) 推荐(0) 编辑
摘要: 脚本: from flask import Flaskapp = Flask(__name__)@app.route('/')def hello_world(): return 'Hello, World!' 报错解决如下: 安装flask 首先打开配置界面: 找到Project Interpret 阅读全文
posted @ 2021-10-29 23:07 suesky 阅读(362) 评论(0) 推荐(0) 编辑
摘要: 1.下载nginx(http://nginx.org/en/download.html) 2.打开conf文件夹,找到nginx.conf 找到,改一下端口号 3.cmd下运行 start nginx,访问8080即可 http://127.0.0.1:8080/ 查看是否能打开网页 阅读全文
posted @ 2021-10-29 23:02 suesky 阅读(883) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-10-29 18:44 suesky 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 报错 ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: / 阅读全文
posted @ 2021-10-29 16:58 suesky 阅读(3669) 评论(0) 推荐(0) 编辑
摘要: 打开网址下载pip: https://pypi.org/project/pip/#files 解压 现在开始安装 进入cmd之后,进入d盘: d: 我的解压目录如下 D:\software\python\pip-21.3.1\pip-21.3.1 进入目录之后 python setup.py ins 阅读全文
posted @ 2021-10-29 16:42 suesky 阅读(723) 评论(0) 推荐(0) 编辑
摘要: 三元运算符语法: 成立做的事: 条件? 不成立做的事 x,y = 4,5if x < y: small = xelse: small = yprint(small)#三元操作符语法:x if 条件 else ysmall = x if x < y else yprint(small) 阅读全文
posted @ 2021-09-23 10:27 suesky 阅读(505) 评论(0) 推荐(0) 编辑
摘要: 场景一: 继续 select 1)查找studen1表,名称(c_name)包含 “i” 的数据 2)查找class1表,id 包含 “1” 的数据 3)查找class1表,id 包含 “1” 的数据,按id降序 4)查找class1表,id 包含 “1” 的数据 ,取id最大的三个 场景二: Pa 阅读全文
posted @ 2021-05-24 21:11 suesky 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 场景如下: 1)查询class1表 id = 1 的内容 2)查询studen1 表 grade=100 的内容 实践如下: 1)select * from class1 where id=1; 2)select * from studen1 where grade=100; 阅读全文
posted @ 2021-05-20 20:52 suesky 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 一、场景如下 插入 insert:1)向表class1插入数据 id = 1 ,uname = stu1 ,stu1 = 2020 id = 2 ,uname = stu2 ,stu1 = 2020id=11,uname =stu3,sex=1 id=12,uname = stu4,sex=2 id 阅读全文
posted @ 2021-05-20 20:34 suesky 阅读(458) 评论(0) 推荐(0) 编辑