摘要: 通过python 来实现这样一个简单的爬虫功能,把我们想要的图片爬取到本地。 下面使用python来实现这样一个功能。 # -*- coding: utf-8 -*-""" 爬取图片 """import urllibimport reimport timeimport os# 显示下载进度def s 阅读全文
posted @ 2021-06-01 14:43 2538 阅读(476) 评论(0) 推荐(0) 编辑
摘要: 案例1: # coding=utf-8import requests# 以get方法发送请求,返回数据response = requests.get('http://www.baidu.com')# 以二进制写入的方式打开一个文件f = open('index.html', 'wb')# 将响应的字 阅读全文
posted @ 2021-06-01 14:09 2538 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 转载自https://blog.csdn.net/fang_mu_mu/article/details/107370412 <?php/** * php 简单爬虫 * @todo snoopy.class\curl\file_get_contents采集类的用法 * */include('Snoop 阅读全文
posted @ 2021-05-31 10:24 2538 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 其中 http://127.0.0.1/1/1/8.php文件 <?php $id=$_GET['id'];///// 参数 传参 可以同时绑定参数和绑定结果$mysqli = new MYSQLI( 'localhost', 'root', '12345678', 'test' ); //实例化m 阅读全文
posted @ 2021-05-28 11:40 2538 阅读(918) 评论(0) 推荐(0) 编辑
摘要: 使用ajax与php后台交互。 下面是JQuery的ajax()与php交互的简单例子。 index.html代码 <!DOCTYPE html><html><head><meta charset="utf-8"> <!--利用cdn添加js和css库 --> <script src="https: 阅读全文
posted @ 2021-05-26 18:16 2538 阅读(376) 评论(0) 推荐(0) 编辑
摘要: https://learnku.com/docs/laravel/7.x/routing/7458 阅读全文
posted @ 2021-05-26 15:27 2538 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 配置图片: 伪静态配置文件: #<IfModule mod_rewrite.c> # Options +FollowSymlinks -Multiviews # RewriteEngine On # # RewriteCond %{REQUEST_FILENAME} !-d # RewriteCon 阅读全文
posted @ 2021-05-26 11:22 2538 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 目的:Mysql 聚合函数嵌套使用 聚合函数不可以直接嵌套使用,比如: max(count(*)) 但是可以嵌套子查询使用 eg: 注:后面那个 as 必须要写 select max(total) from ( select count(*) as total from blog group by 阅读全文
posted @ 2021-05-22 14:11 2538 阅读(438) 评论(0) 推荐(0) 编辑
摘要: 一、IFNULL用法 1.1 IFNULL(expr1,expr2)用法 假如expr1不为NULL,则 IFNULL() 的返回值为expr1; 否则其返回值为 expr2。IFNULL()的返回值是数字或是字符串,具体情况取决于其所使用的语境。 mysql> SELECT IFNULL(1,0) 阅读全文
posted @ 2021-05-22 11:15 2538 阅读(313) 评论(0) 推荐(0) 编辑
摘要: ///数据库定义变量,并且可以当value 值插入 select @num:=count(userid) from t_users ; insert into t_game_online (pnum) VALUES (@num); 阅读全文
posted @ 2021-05-22 10:23 2538 阅读(285) 评论(0) 推荐(0) 编辑