首页
留言
Search
1
在Centos7下搭建Socks5代理服务器
1,207 阅读
2
在windows11通过Zip安装Mysql5.7
729 阅读
3
Mysql5.7开放远程登录
636 阅读
4
数据库
621 阅读
5
mysql5.7基本命令
523 阅读
综合
正则表达式
git
系统
centos7
ubuntu
kali
Debian
网络
socks5
wireguard
运维
docker
hadoop
kubernetes
hive
openstack
ElasticSearch
ansible
前端
三剑客
Python
Python3
selenium
Flask
PHP
PHP基础
ThinkPHP
游戏
我的世界
算法
递归
排序
查找
软件
ide
Xshell
vim
PicGo
Typora
云盘
安全
靶场
reverse
Java
JavaSE
Spring
MyBatis
C++
QT
数据库
mysql
登录
Search
标签搜索
java
centos7
linux
centos
html5
JavaScript
php
css3
mysql
spring
mysql5.7
linux全栈
ubuntu
BeanFactory
SpringBean
python
python3
ApplicationContext
kali
mysql8.0
我亏一点
累计撰写
139
篇文章
累计收到
3
条评论
首页
栏目
综合
正则表达式
git
系统
centos7
ubuntu
kali
Debian
网络
socks5
wireguard
运维
docker
hadoop
kubernetes
hive
openstack
ElasticSearch
ansible
前端
三剑客
Python
Python3
selenium
Flask
PHP
PHP基础
ThinkPHP
游戏
我的世界
算法
递归
排序
查找
软件
ide
Xshell
vim
PicGo
Typora
云盘
安全
靶场
reverse
Java
JavaSE
Spring
MyBatis
C++
QT
数据库
mysql
页面
留言
搜索到
139
篇与
1585364631
的结果
2022-05-10
PHP生成随机验证码
PHP生成随机验证码源代码:<?php // $img_w 图片宽 // $img_h 图片高 // $char_len 验证码字符数 // $font 字体大小(内置字体1-5) // $px 随机干扰像素点 // $line 随机线条数 function getCode($img_w=100,$img_h=40,$char_len=5,$font=5,$px=80,$line=10){ //生成码值数组,不需要0,避免与字母o冲突 $char = array_merge(range("A","Z"),range("a","z"),range("1","9")); //随机获取$char_len个码值的键 $rand_keys = array_rand($char,$char_len); //判断当码值长度为1时,将其放入数组中 if($char_len == 1){ $rand_keys = array($rand_keys); } //打乱随机获取的码值键的数组 shuffle($rand_keys); //根据键获取对应的码值,并拼接成字符串 $code=''; foreach($rand_keys as $i){ $code = $code . $char[$i]; } //----1 生成画布 $img = imageCreateTrueColor($img_w,$img_h); //设置背景 $bg_color = imageColorAllocate($img,0xcc,0xcc,0xcc); imageFill($img,0,0,$bg_color); //干扰像素 for($i=0;$i<=$px;$i++){ $color = imageColorAllocate($img,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255)); imageSetPixel($img,mt_rand(0,$img_w),mt_rand(0,$img_h),$color); } for($i=0;$i<=$line;$i++){ $color = imageColorAllocate($img,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255)); imageline($img,mt_rand(0,$img_w),mt_rand(0,$img_h),mt_rand(0,$img_w),mt_rand(0,$img_h),$color); } //矩形边框 $rect_color = imageColorAllocate($img,0x90,0x90,0x90); imageRectangle($img,0,0,$img_w-1,$img_h-1,$rect_color); //----2 操作画布 //设定字符串颜色 $str_color = imageColorAllocate($img,mt_rand(0,100),mt_rand(0,100),mt_rand(0,100)); //设定字符串位置 $font_w = imageFontWidth($font); $font_h = imageFontHeight($font); $str_w = $font_w * $char_len; imageString($img,$font,($img_w-$str_w)/2,($img_h-$font_h)/2,$code,$str_color); $resulf = array( "code" => $code, "img" => $img ); return $resulf; } // $res['code'] 验证码 // $res['img'] 图片 $res = getCode(); session_start(); $_SESSION['captcha_code'] = $res['code']; header("Content-Type: image/png"); imagepng($res['img']); imagedestroy($res['img']); ?>
2022年05月10日
309 阅读
0 评论
0 点赞
2022-05-04
Python 更新pip报错
Python 更新pip报错python -m pip install --upgrade pip -i https://pypi.douban.com/simple报错如下:Requirement already satisfied: pip in解决办法:删除提示目录下的site-packages文件夹中的pip-21.2.4.dist-info重新执行即可
2022年05月04日
316 阅读
0 评论
0 点赞
2022-04-19
解决Xshell连接系统使用vim无法粘贴的问题
解决Xshell连接系统使用vim无法粘贴的问题1.编辑vim基础配置文件vim /usr/share/vim/vim82/defaults.vim2.修改配置ESC -> /set mouse=a set mouse=a #修改内容 set mouse=v ESC -> :wq
2022年04月19日
341 阅读
0 评论
0 点赞
2022-04-19
Linux apt更换国内软件源
Linux apt更换国内软件源1.编辑apt源文件vim /etc/apt/sources.list2.注释官方源,添加国内源# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/ #deb http://http.kali.org/kali kali-rolling main contrib non-free deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib # Additional line for source packages # deb-src http://http.kali.org/kali kali-rolling main contrib non-free3.更新源apt-get dist-upgrade apt-get update
2022年04月19日
339 阅读
0 评论
0 点赞
2022-04-19
Linux开启root用户的ssh登入
Linux开启root用户的ssh登入1.修改文件vim /etc/ssh/sshd_config2.去掉注释并且修改PermitRootLogin yes3.重启sshservice ssh restart
2022年04月19日
236 阅读
0 评论
0 点赞
1
...
15
16
17
...
28