Loading

随笔分类 -  PHP

PHP
摘要:html代码 PHP代码,02-reg.php 测试结果截图: 阅读全文
posted @ 2018-11-24 22:38 王召波 阅读(171) 评论(0) 推荐(0) 编辑
摘要:声明一个方法,直接调用即可 以下是类库的全部代码,复制粘贴即可 阅读全文
posted @ 2018-11-23 00:17 王召波 阅读(542) 评论(0) 推荐(0) 编辑
摘要:以前写的现在记录一下 thinkphp框架 前端代码 <HTML> <HEAD> <TITLE> Ajax地域联动 </TITLE> <meta http-equiv=Content-Type content="text/html;charset=utf-8"/> <script src="http 阅读全文
posted @ 2018-11-04 01:17 王召波 阅读(5418) 评论(0) 推荐(0) 编辑
摘要:###post/get请求方法 function getCurl($url,$data=null,$method='post',$https=true){ //1. 初始化 $ch = curl_init(); //2.设置参数 curl_setopt($ch, CURLOPT_URL,$url); 阅读全文
posted @ 2018-08-17 09:58 王召波 阅读(726) 评论(0) 推荐(0) 编辑
摘要:方法一(推荐): 方法二(慢,消耗服务器) 图片转base64 阅读全文
posted @ 2018-06-12 18:31 王召波 阅读(880) 评论(0) 推荐(0) 编辑
摘要:需求:在项目中输入 p($arr); 将会格式化输出 一、在GitHub上创建仓库 1.1这个仓库必须包含composer.json文件,内容如下. 参数说明:http://docs.phpcomposer.com/04-schema.html#autoload 1.2创建p.php文件内容如下 1 阅读全文
posted @ 2018-05-26 14:04 王召波 阅读(288) 评论(0) 推荐(0) 编辑
摘要:下载地址: 建议使用composer安装,命令如下: 代码如下: 注意:QQ的登录密码是授权码,在QQ邮箱,账户设置 腾讯企业邮箱,需要先绑定微信,然后出现以下页面 企业邮箱Host: smtp.exmail.qq.com QQ邮箱Host: smtp.qq.com 阅读全文
posted @ 2018-04-24 16:13 王召波 阅读(979) 评论(0) 推荐(0) 编辑
摘要:PHP代码文件名 chat.php html代码chat.html 执行php chat.php 浏览器打开http://192.168.1.121/chat.html完成 阅读全文
posted @ 2018-03-28 09:44 王召波 阅读(388) 评论(0) 推荐(0) 编辑
摘要:使用openssl加解密算法 阅读全文
posted @ 2018-03-26 09:41 王召波 阅读(1968) 评论(0) 推荐(0) 编辑
摘要:PHP执行时间太长导致的 我在程序的最上方写了set_time_limit(0);不管用 因为max_execution_time在 php-cgi(php-fpm) 中,该参数不会起效。 真正能够控制 PHP 脚本最大执行时间的是 php-fpm.conf 配置文件中的request_termin 阅读全文
posted @ 2018-03-23 14:01 王召波 阅读(560) 评论(0) 推荐(0) 编辑
摘要:1、使用phpinfo();查看配置信息 2、搜索Additional .ini files parsed 3、查看opcache安装目录 4、打开文件将 opcache.enable=1 改成 opcache.enable=0 阅读全文
posted @ 2018-03-22 14:31 王召波 阅读(1194) 评论(0) 推荐(0) 编辑
摘要:今天配置了一下thinkphp3.1.3 报错 无法加载模块:index 错误位置 FILE: D:\phpStudy\WWW\wwqq\thinkphp\Common\functions.php LINE: 112 访问路径 http://localhost/wwqq/Home/index/ind 阅读全文
posted @ 2018-01-22 18:11 王召波 阅读(847) 评论(0) 推荐(0) 编辑
摘要:Siege是linux下的一个web系统的压力测试工具,支持多链接,支持get和post请求,可以对web系统进行多并发下持续请求的压力测试。 安装 Siege Siege命令常用参数 更多参数 常用的siege命令举例 200个并发对http://www.google.com发送请求100次 在u 阅读全文
posted @ 2018-01-18 11:52 王召波 阅读(209) 评论(0) 推荐(0) 编辑
摘要:igbinary扩展 http://windows.php.net/downloads/pecl/releases/igbinary/2.0.1/ redis扩展 https://pecl.php.net/package/redis或者http://windows.php.net/downloads 阅读全文
posted @ 2018-01-16 19:28 王召波 阅读(184) 评论(0) 推荐(0) 编辑
摘要:打开Apache安装的bin目录 shift+鼠标右键 复制粘贴以下代码->回车 上例表示总共访问http://localhost/test.php这个脚本1000次,100并发(模拟100个用户同时访问)。 mpm介绍 mpm是apache自带的,可以用它来测试网站的并发量有多大和某个页面的访问时 阅读全文
posted @ 2018-01-16 14:07 王召波 阅读(397) 评论(0) 推荐(0) 编辑
摘要:简单来说,Phar就是把Java界的jar概念移植到了PHP界。 Phar可以将一组PHP文件进行打包,还可以创建默认执行的stub(或者叫做 bootstrap loader),Phar可以选择是否进行压缩,可选gzip和bzip2格式。 下面举例说明如何创建和使用Phar: 假设我们的项目名称是 阅读全文
posted @ 2018-01-16 09:49 王召波 阅读(4744) 评论(0) 推荐(0) 编辑
摘要:新浪接口(速度快) $url = 'http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=json&ip='.$ip; $arr = json_decode(file_get_contents($url),true); 淘宝接口(特别慢) 阅读全文
posted @ 2017-12-28 12:08 王召波 阅读(3947) 评论(1) 推荐(0) 编辑
摘要:日期:2017/11/6 操作系统:windows 今天抓取网页的时候出现&nbsp;无法替换,经过多次测试,找到了办法;(注意是从网页上抓取到的) 分割 替换 后来我测试了直接在PHP里面赋值给变量的时候 用explode("&nbsp",$str);可以用, 但是从网页上抓过来的不行. 虽然找到 阅读全文
posted @ 2017-11-06 20:50 王召波 阅读(298) 评论(0) 推荐(0) 编辑
摘要://文本框:textInput(); //密码框:passwordInput(); //单选框:radio(),radioList(); //复选框:checkbox(),checkboxList(); //下拉框:dropDownList(); //隐藏域:hiddenInput(); //文本域:textarea(['rows'=>3]); //文件上传:fileInput(); //提交按... 阅读全文
posted @ 2017-11-02 09:43 王召波 阅读(157) 评论(0) 推荐(0) 编辑
摘要:Sublime 1 .安装了追踪插件,ctrl+鼠标左键点击PHP函数跳到函数声明的位置. 2.已汉化 链接:http://pan.baidu.com/s/1hs5qonE 密码:b8fw 相关文章: Sublime自定义语法 Atom 和Sublime类似,其实就是仿的 2.安装插件简单,直接搜索 阅读全文
posted @ 2017-09-19 19:37 王召波 阅读(361) 评论(0) 推荐(0) 编辑