-
php生出随机字符串
[PHP教程] 2021-02-03 14:08:49 71人阅读
本文实例为大家分享了php生出随机字符串的具体代码,供大家参考,具体内容如下 echo generateRandomString(20); /** 随机生成字符串 @param int $length @return null|string */ private static function getRandCha...[详细]
-
微信开发之获取JSAPI TICKET
[PHP教程] 2021-02-03 14:04:12 57人阅读
一、获取流程 1、获取 access_token 2、通过access_token换取 jsapi_ticket 3、签名算法 签名生成规则如下:参与签名的字段包括noncestr(随机字符串),有效的jsapi_ticket,timestamp(时间戳),url(当前网页的URL...[详细]
-
Yii2第三方类库插件Imagine的安装和使用
[PHP教程] 2021-02-03 14:03:27 79人阅读
Imagine Imagine 是一个面向对象的 PHP 类库用于图片操作。这个类库能够处理一些常用到的操作如:调整大...[详细]
-
一个实用的php验证码类
[PHP教程] 2021-02-03 14:02:26 141人阅读
万能php验证码类,供大家参考,具体内容如下 code.php是验证码类,类的名称最好和文件名的名称一样,这样有利于我们的查看。 code.php public function __construct($number=4,$codeType=0,$height=50,$width=100){ ...[详细]
-
php实现保存周期为1天的购物车类
[PHP教程] 2021-02-03 14:01:51 188人阅读
本文实例为大家分享了php购物车类的具体代码,供大家参考,具体内容如下 购物车类 Cookies 保存,保存周期为1天 注意:浏览器必须支持Cookie才能够使用 示例代码: Expires = $Expires; $this->addCart($Id,$Name,$P...[详细]
-
由php中字符offset特征造成的绕过漏洞详解
[PHP教程] 2021-02-03 13:56:43 176人阅读
php中的字符offset特性 php中的字符串存在一个非常有趣的特性,php中的字符串也可以像数组一样进行取值。 最后的结果就是h。 但是上述的这种特性有时会有意想不到的效果,看下面这段代码 上述的代码的输出结果是h.这...[详细]
-
利用php的ob缓存机制实现页面静态化方法
[PHP教程] 2021-02-03 13:53:47 61人阅读
首先介绍一下php中ob缓存常用到的几个常用函数 ob_start():开启缓存机制 ob_get_contents():获取ob缓存中的内容 ob_clean()清除ob缓存中的内容,但不关闭缓存 ob_end_clean() 清除ob缓存中的内容,并关闭缓...[详细]
-
解决安装WampServer时提示缺少msvcr110.dll文件
[PHP教程] 2021-02-03 13:49:26 102人阅读
今天开始学习PHP,对于初学者来说,我们一定希望从简单的开始,所以,从集成环境非常好的WampServer的安装开始. 1、下载WampServer安装程序,安装完毕后会出现一个错误.如下: 2、这是因为你的电脑缺少c++环境。你可...[详细]
-
详解php中serialize()和unserialize()函数
[PHP教程] 2021-02-03 13:48:40 70人阅读
php的serialize()函数和unserialize()函数 适用情境:serialize()返回字符串,此字符串包含了表示value的字节流,可以存储于任何地方。这有利于存储或传递 PHP 的值,同时不丢失其类型和结构。比较有用的地方就是将...[详细]
-
PC端微信扫码支付成功之后自动跳转php版代码
[PHP教程] 2021-02-03 13:47:51 92人阅读
本文实例为大家分享了php微信扫码支付成功之后自动跳转的具体代码,供大家参考,具体内容如下 场景: PC端 微信扫码支付 结果: 支付成功 自动跳转 实现思路: 支付二维码页面,写ajax请求支付状态,请求到结果,无...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]