接着上篇来看 https://www.cnblogs.com/cuocuo/p/14329379.html <?php namespace Home\Controller; use Think\Controller; use \Think\Logs; class IndexController ex ...
分类:
Web程序 时间:
2021-01-27 13:29:47
阅读次数:
0
1 脚本 from locust import HttpLocust, TaskSet, task, between # 新建任务集 class TestLogin(TaskSet): @task def req_index(self): data = { "username": "admin", ...
分类:
其他好文 时间:
2021-01-27 13:25:57
阅读次数:
0
get请求:-Dmaven.tomcat.uriEncoding=UTF-8 tomcat7:run 解决get请求中文乱码 post请求:在WEB-INFO下web.xml里添加如下过滤器代码 <filter> <filter-name>CharacterEncodingFilter</filte ...
分类:
编程语言 时间:
2021-01-27 13:08:41
阅读次数:
0
确实,PHP没有类似于JS中的setInterval或者setTimeout这样的原生定时器相关的函数。但是我们可以通过其他方式来实现,比如使用declare。 先来看看是如何实现的,然后我们再好好学习一下declare表达式到底是个什么东西。 function do_tick($str = '') ...
分类:
Web程序 时间:
2021-01-26 12:27:44
阅读次数:
0
Get和Post是两种不同的类型的请求。 它们主要有3点不同。 1.get请求通过浏览器地址栏传递表单数据。post请求通过form data 传递数据,不会通过地址栏。 2.get请求安全性较低,post请求安全性较高 3.get请求不能上传大量的数据,每次只能传递1M数据。post请求可以上传大 ...
分类:
其他好文 时间:
2021-01-26 12:03:31
阅读次数:
0
ansible实战:lamp 环境说明: 主机IP 需要安装的服务 192.168.100.1 ansible 192.168.100.2 httpd 192.168.100.3 mysql 192.168.100.4 php 项目结构预览: [root@ansible project]# tree ...
分类:
其他好文 时间:
2021-01-26 11:50:59
阅读次数:
0
摘要:在WEB应用中有时候程序员为了考虑灵活性,简明性,会在代码调用或者命令执行函数去处理。比如当应用在调用一些能将字符串转换为代码的函数时,没有考虑用户是都能控制这个字符串,将造成代码执行漏洞。同样调用系统命令处理,将造成命令执行漏洞 函数eval: eval() 函数把字符串按照 PHP 代码来 ...
分类:
其他好文 时间:
2021-01-25 11:13:38
阅读次数:
0
lcfirst () 使一个字符串的第一个字符小写 lcfirst ( string $str ) : string 参数描述 str必需。规定要转换的字符串。 返回值: 返回第一个字母小写的 str 字符串,如果是字母的话。 实例: echo lcfirst('Hello World'); //h ...
分类:
Web程序 时间:
2021-01-25 11:06:24
阅读次数:
0
docker exec -it php php /www/my_project/think version >> my.log docker exec -it php 执行容器 php /www/my_project/think version 执行php指令 并将执行结果写入日志 ...
分类:
Web程序 时间:
2021-01-25 10:34:25
阅读次数:
0
ucwords () 函数把字符串中每个单词的首字符转换为大写。 ucwords ( string $str ) : string 参数描述 str必需。规定要转换的字符串。 返回值: 返回把字符串中每个单词的首字符转换为大写。 实例: echo ucwords("hello world!"); / ...
分类:
Web程序 时间:
2021-01-22 12:26:13
阅读次数:
0