首页
留言
Search
1
在Centos7下搭建Socks5代理服务器
1,185 阅读
2
在windows11通过Zip安装Mysql5.7
705 阅读
3
Mysql5.7开放远程登录
612 阅读
4
数据库
600 阅读
5
mysql5.7基本命令
501 阅读
综合
正则表达式
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
篇文章
累计收到
34
条评论
首页
栏目
综合
正则表达式
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
页面
留言
搜索到
13
篇与
PHP基础
的结果
2022-04-14
PHP读写文件失败
PHP读写文件失败<?php $fp = fopen("cnbruce.txt","w+"); fwrite($fp,"1111"); ?>问题分析进入所在目录[root@website wwwroot]# ll总用量 36-rwx------. 1 www www 168 4月 14 00:57 access_token.daodrwx------. 2 www www 57 4月 13 14:22 china_weather-rwx------. 1 www www 1599 4月 11 20:55 get_access_token.php-rwx------. 1 www www 25202 4月 13 21:16 index.phpdrwxr-xr-x. 2 root root 23 4月 14 19:43 jijin发现文件权限属组是root,因为是在root下创建的目录问题解决更改属组问题chown www:www jijin打开php网页验证
2022年04月14日
265 阅读
0 评论
0 点赞
2022-03-17
PHP随机生成双色球
PHP随机生成双色球输出效果 双色球抽取 .red_ball{ position: relative; float: left; width: 50px; height: 50px; border-radius: 50%; background-color: red; text-align: center; line-height: 50px; margin: 5px; font-size: 25px; color: white; } .blue_ball{ position: relative; float: left; width: 50px; height: 50px; border-radius: 50%; background-color: blue; text-align: center; line-height: 50px; margin: 5px; font-size: 25px; color: white; } 15132807310307 源代码函数解释range()生成数组array_rand()随机取数组中的几个下标或键名shuffle()打乱数组顺序rand(min,max)生成指定范围随机数<!DOCTYPE html> <html> <meta charset="utf8"/> <head> <title>双色球抽取</title> <style> .red_ball{ position: relative; float: left; width: 50px; height: 50px; border-radius: 50%; background-color: red; text-align: center; line-height: 50px; margin: 5px; font-size: 25px; color: white; } .blue_ball{ position: relative; float: left; width: 50px; height: 50px; border-radius: 50%; background-color: blue; text-align: center; line-height: 50px; margin: 5px; font-size: 25px; color: white; } </style> </head> <body> <?php //创建红球的数组范围 $red_num = range(1,33); //随机在红球范围内取出6个数 //array_rand()取的是数组的下标或者键名 $red = array_rand($red_num,6); //打乱数组顺序 shuffle($red); //输出红球 foreach($red as $i){ $ls = $red_num[$i]; if($ls<10)$ls = '0' . $ls; echo "<div class='red_ball'>$ls</div>"; } //从1-16中随机取出一个数字 $blue = rand(1,16); if($blue<10)$blue = '0' . $blue; echo "<div class='blue_ball'>$blue</div>"; ?> </body> </html>
2022年03月17日
307 阅读
0 评论
0 点赞
2022-03-15
PHP取文件路径后缀名
PHP取文件路径后缀名<?php function getfileExtension($path){ return substr($path,strrpos($path,'.')+1,); } $Path = "D:\www\111.jpg"; echo getfileExtension($Path); ?>结果:jpg
2022年03月15日
299 阅读
0 评论
0 点赞
2022-03-15
PHP数组订单
PHP数组订单 table{ text-align: center; } td{ text-align: center; width: 200px; } PHP数组订单 订单 物品价格地方数量小计主板379广东31137显卡799上海21598硬盘589北京52945总计:5680 <!DOCTYPE html> <meta charset="utf-8" /> <head> <style> table{ text-align: center; } td{ text-align: center; width: 200px; } </style> <title>PHP数组订单</title> <?php $title = array('物品','价格','地方','数量','小计'); $goods = array( array('name'=>'主板','price'=>'379','producing'=>'广东','num'=>3), array('name'=>'显卡','price'=>'799','producing'=>'上海','num'=>2), array('name'=>'硬盘','price'=>'589','producing'=>'北京','num'=>5), ); echo "<table border='1'><tr> <th colspan='5'>订单</th> </tr><tr>"; foreach($title as $i => $ii){ echo "<td>$ii</td>"; } echo "</tr>"; $sum_price = 0; foreach($goods as $i => $ii){ echo "<tr>"; foreach($ii as $j => $k){ echo "<td>$k</td>"; if($k == end($ii)) { $small_price = $ii['price'] * $ii['num']; $sum_price+=($small_price); echo "<td>$small_price</td>"; } } echo "</tr>"; } echo "<tr><td colspan='5'>总计:$sum_price</td></tr></table>"; ?> </head> </html>
2022年03月15日
240 阅读
0 评论
0 点赞
2022-03-10
PHP 循环
PHP 循环PHP while循环输出金字塔<?php $i = 1; $line = 10; while($i<=$line){ $j = $line - $i; $k = 2 * $i - 1; while($j>0){ $j--; echo " "; } while($k>0){ $k--; echo "*"; } echo "<br />"; $i++; } ?>PHP for循环输出九九乘法表<?php echo ("<style>td{border:2px solid black;text-align:center;padding:5px;}</style><table>"); for($i=1;$i<=9;$i++){ for($ii=1;$ii<=$i;$ii++){ echo ("<td>" . $ii . "x" . $i . "=" . $i*$ii . "</td>"); } echo ("<tr/>"); } echo ("</table>") ?>PHP forearm遍历数字索引数组所有值<?php $sz = array(1,2,3,4,5,6,7,8,9); foreach($sz as $i){ echo $i . "<br/>"; } foreach($sz as $i => $k){ echo "索引:" . $i . " 值:" . $k . "<br/>"; } ?>遍历字符关联数组(键值对)<?php $key_value0 = array('name'=>'手机','num'=>'5','price'=>'4500'); foreach($key_value0 as $i){ echo "$i "; } echo ('<br>'); foreach($key_value0 as $i => $j){ echo "键名:$i 键值:$j <br/>"; } $key_value = array( array('name'=>'手机','num'=>'5','price'=>'4500'), array('name'=>'电脑','num'=>'15','price'=>'10500'), array('name'=>'鼠标','num'=>'500','price'=>'20'), array('name'=>'键盘','num'=>'500','price'=>'20') ); foreach($key_value as $i){ foreach($i as $k => $v){ echo $k . '----' . $v . ' '; } echo '<br/>'; } foreach($key_value as $ii){ echo '物品:' . $ii['name'] . ' 数量:' . $ii['num'] . ' 价格:' . $ii['price'] . "<br/>"; } ?>
2022年03月10日
275 阅读
0 评论
0 点赞
1
2
3