Myluzh Blog

PHP生成随机验证码

2020-9-28 myluzh PHP

function randomkeys($length) { $pattern = '1234567890ABCDEFGHIJKLOMNOPQRSTUVWXYZ'; $key = null; for($i=0;$i<$length;$i++) { $key.= $pattern[mt_rand(0,strlen($pattern)-1)]; //生成php随机数 } return $key; } $Code=randomkeys(6); //生成6位随机 echo $Code;

阅读全文>>

标签: php

评论(0) (809)

mysql 报错 [ERR] 1273 - Unknown collation: 'utf8mb4_0900_ai_ci'

2020-9-21 myluzh MySQL

0x01 报错原因: 生成转储文件的数据库版本为8.0,要导入sql文件的数据库版本为5.6,因为是高版本导入到低版本,引起mysql 1273错误。 0x02 解决方法: 编辑sql文件,将文件中的所有 utf8mb4_0900_ai_ci替换为utf8_general_ci utf8mb4替换为utf8 保存后再次运行sql文件,运行成功

阅读全文>>

标签: mysql 1273 数据库

评论(0) (876)

您想按国家/地区阻止访客吗?

2020-9-15 myluzh SECURE

goto: https://www.ip2location.com/free/visitor-blocker Do you want to block visitors by country? Select the countries you want to block, IP address version (IPv4 or IPv6), output format and press the "Download" button. The output formats supported are Apache .htaccess, Linux iptables, CIDR, Netmask, Inverse Netmask, IIS web.config, Cisco ACL, PeerGuardian2, network-object, Cisco bit bucket, Juniper Junos and MikroTik. Please find the details below: Format ...

阅读全文>>

标签: 阻止 拦截 国家 访客

评论(0) (198)