上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页
摘要: 查看/etc/rc.local是否有执行权限,没有就加上chmod +x /etc/rc.local 阅读全文
posted @ 2020-04-28 15:09 酷酷的城池 阅读(904) 评论(0) 推荐(0) 编辑
摘要: $mail = new PHPMailer(true); // Enable verbose debug output $mail->isSMTP(); $mail->SMTPDebug = 0; // Set mailer to use SMTP $mail->Host = 'smtp.qq.co 阅读全文
posted @ 2020-04-21 16:42 酷酷的城池 阅读(154) 评论(0) 推荐(0) 编辑
摘要: <?php include_once('./common.php'); include_once('./config.php'); $wechatObj = new wechatCallbackapiTest(); if (!isset($_GET['echostr'])) { $wechatObj 阅读全文
posted @ 2020-04-17 13:48 酷酷的城池 阅读(242) 评论(0) 推荐(0) 编辑
摘要: <?php $signature = $_GET["signature"]; $timestamp = $_GET["timestamp"]; $nonce = $_GET["nonce"]; $token = 'ssss'; $tmpArr = array($token, $timestamp, 阅读全文
posted @ 2020-04-16 18:19 酷酷的城池 阅读(457) 评论(0) 推荐(0) 编辑
摘要: <?php $email=$_GET["email"]; #做一些操作 header("Content/type:image/png"); echo 图片路径'; ?> 发送的内容是html格式的 在内容内设置图片 请求的是php代码图片路径内添加当前的邮件地址 然后你就明白了... 阅读全文
posted @ 2020-04-16 09:21 酷酷的城池 阅读(209) 评论(0) 推荐(0) 编辑
摘要: http://houdunren.gitee.io/note/mysql/5%20%E6%97%A5%E6%9C%9F%E6%97%B6%E9%97%B4.html#%E5%8F%82%E6%95%B0%E4%BB%8B%E7%BB%8D 日期时间类型占用空间日期格式最小值最大值零值表示 DATET 阅读全文
posted @ 2020-04-16 09:14 酷酷的城池 阅读(1149) 评论(0) 推荐(0) 编辑
摘要: <?php /** * PHP实现jwt */ class Jwt { //头部 private static $header = [ //生成signature的算法 'alg' => 'HS256', //类型 'typ' => 'JWT' ]; //使用HMAC生成信息摘要时所使用的密钥 pr 阅读全文
posted @ 2020-04-14 17:10 酷酷的城池 阅读(1231) 评论(0) 推荐(0) 编辑
摘要: 一,安装librdkafka sudo wget https://github.com/edenhill/librdkafka/archive/v0.9.4.tar.gz -O librdkafka-0.9.4.tar.gzsudo tar -zxvf librdkafka-0.9.4.tar.gz 阅读全文
posted @ 2020-04-14 16:02 酷酷的城池 阅读(652) 评论(0) 推荐(0) 编辑
摘要: 执行 php composer.phar install 提示 Loading composer repositories with package informationUpdating dependencies (including require-dev) 1. 根本原因: 下载源在国外,无法 阅读全文
posted @ 2020-04-14 10:06 酷酷的城池 阅读(3290) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/2eef885b4aed 1.安装依赖包 sudo apt-get update sudo apt-get install -y curl openssh-server ca-certificates 2. 邮件配置 选择Internet那一项,不 阅读全文
posted @ 2020-04-11 13:50 酷酷的城池 阅读(396) 评论(0) 推荐(0) 编辑
摘要: MySQL 批量修改某一列的值为另外一个字段的值 1 2 3 4 5 6 7 8 9 10 11 mysql> select * from fruit; + + + + | id | name | price | + + + + | 1 | apple | 0 | | 2 | banana | 0 阅读全文
posted @ 2020-04-10 16:03 酷酷的城池 阅读(3688) 评论(0) 推荐(0) 编辑
摘要: <?php #保留允许的键值 if(!function_exists('keep_allow_array')){ function keep_allow_array($data,$allow_array){ if(!is_array($data) || !is_array($allow_array) 阅读全文
posted @ 2020-04-08 17:59 酷酷的城池 阅读(691) 评论(0) 推荐(0) 编辑
摘要: function xml_to_array($Obj){ $result= (array)simplexml_load_string($Obj,'SimpleXMLElement', LIBXML_NOCDATA); return $result; } 阅读全文
posted @ 2020-04-02 13:41 酷酷的城池 阅读(142) 评论(0) 推荐(0) 编辑
摘要: <?php /************************************************************** * * 使用特定function对数组中所有元素做处理 * @param string &$array 要处理的字符串 * @param string $fun 阅读全文
posted @ 2020-04-02 13:39 酷酷的城池 阅读(642) 评论(0) 推荐(1) 编辑
摘要: /*获取唯一订单号*/ function order_number($order_header){ global $redis; if(trim_all($order_header)!=""){ $order_header=trim_all($order_header)."-"; } $time=t 阅读全文
posted @ 2020-04-02 09:53 酷酷的城池 阅读(407) 评论(0) 推荐(0) 编辑
摘要: bate版本内有打对勾 阅读全文
posted @ 2020-03-20 23:45 酷酷的城池 阅读(463) 评论(0) 推荐(0) 编辑
摘要: python正则表达式(1)--特殊字符 正则表达式—特殊表达式含义 正则表达式的字母和数字表示他们自身,但多数字母和数字前加一个反斜杠时会拥有不同的含义。 下面列出了正则表达式模式语法中的特殊元素。 1.普通字符集 1) \w 匹配字母数字及下划线 2) \W 匹配非字母数字及下划线 3) \s 阅读全文
posted @ 2020-03-10 09:34 酷酷的城池 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 说明:python3.6后安装时自行安装pip,setuptools 1. 升级的环境信息1.1 操作系统: [root@mongodba bin]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.0 (Santi 阅读全文
posted @ 2020-02-18 18:45 酷酷的城池 阅读(487) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/cf7241166e33 阅读全文
posted @ 2020-02-09 10:57 酷酷的城池 阅读(166) 评论(0) 推荐(0) 编辑
摘要: cols = ", ".join('`{}`'.format(k) for k in i.keys()) val_cols = ', '.join('%({})s'.format(k) for k in i.keys()) inst = ''' INSERT INTO `baidu` (%s) VA 阅读全文
posted @ 2020-01-31 14:43 酷酷的城池 阅读(466) 评论(0) 推荐(0) 编辑
摘要: import requests from lxml import etree # //ul[@id = "showImg"]/li/a/img/@src text = requests.get('your url').text # html = etree.HTML(text) # result = 阅读全文
posted @ 2020-01-21 17:29 酷酷的城池 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Scrapy依赖的包有如下:lxml:一种高效的XML和HTML解析器w3lib:一种处理URL和网页编码多功能辅助twisted:一个异步网络框架cryptography 和 pyOpenSSL:处理各种网络级安全需求——————————————————————————1.先运行一次pip安装 p 阅读全文
posted @ 2020-01-21 15:30 酷酷的城池 阅读(1304) 评论(0) 推荐(0) 编辑
摘要: from PIL import Image import pytesseract im = Image.open('./1.jpg') imgry = im.convert('L') threshold = 140 table = [] for i in range(256): if i < thr 阅读全文
posted @ 2020-01-21 14:15 酷酷的城池 阅读(142) 评论(0) 推荐(0) 编辑
摘要: MySQLdb默认查询结果都是返回tuple,输出时候不是很方便,必须按照0,1这样读取,无意中在网上找到简单的修改方法,就是传递一个cursors.DictCursor就行。 默认程序: import MySQLdb db = MySQLdb.connect(host='localhost', u 阅读全文
posted @ 2020-01-20 15:59 酷酷的城池 阅读(341) 评论(0) 推荐(0) 编辑
摘要: session = requests.session() session.get(r['url']) html_set_cookie = requests.utils.dict_from_cookiejar(session.cookies) print(html_set_cookie) 阅读全文
posted @ 2020-01-16 16:01 酷酷的城池 阅读(7588) 评论(0) 推荐(1) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页