-
php图像验证码生成代码
[PHP教程] 2021-01-19 01:38:10 118人阅读
本文实例为大家分享了php封装的一个生成图像验证码,供大家参考,具体内容如下 一、代码 index..php js+GD2函数制作无刷新验证码 form name="form1" method="post" action="success.php" onSubmit="return chkinput(...[详细]
-
php面向对象的用户登录身份验证
[PHP教程] 2021-01-19 01:37:18 106人阅读
本文实例为大家分享了php用户登录身份验证的具体代码,供大家参考,具体内容如下 一、代码 conn.php open($connstr); ?> index.php 用户身份验证 $username=$_POST[username]; //接收提交的用户名 $userpwd=$_POST[u...[详细]
-
php实现用户注册密码的crypt加密
[PHP教程] 2021-01-19 01:24:09 65人阅读
本文实例为大家分享了php用户注册密码的加密,供大家参考,具体内容如下 一、代码 1、conn.php 2、index.php 用户注册 3、index_ok.php 注册成功。 ";//如果结果为真提示注册成功 }else{ echo " 注册失败! ";//否则...[详细]
-
php封装一个异常的处理类
[PHP教程] 2021-01-19 01:19:41 157人阅读
一、代码 自定义异常处理类 getMessage()."不是一个合法的电话号码"; $errorMsg .=" "; $errorMsg .="错误文件路径:...[详细]
-
php使用crypt()函数进行加密
[PHP教程] 2021-01-19 01:18:41 61人阅读
一、代码 加密后$str的值为:...[详细]
-
微信封装的调用微信签名包的类库
[PHP教程] 2021-01-19 01:10:58 114人阅读
废话不多说了,直接给大家贴代码了,具体代码如下所示: appid = C('APPID...[详细]
-
PHP如何获取当前主机、域名、网址、路径、端口
[PHP教程] 2021-01-19 01:10:31 137人阅读
实验环境: 测试域名daxiangtravel.com,apache根目录/mnt/,测试目录/mnt/qa/test,测试文件名为index.php。 获取代码: 获取当前目录: 获取域名或主机地址 获取网页地址 获取网址参数 $_SERVER['HTTP_REFERER']; ...[详细]
-
PHP中的日期时间处理利器实例(Carbon)
[PHP教程] 2021-01-19 01:09:49 171人阅读
Carbon介绍 Carbon是PHP中很人性化的时间日期处理插件,github拥有接近5000个 star。 github地址为:https://github.com/briannesbitt/Carbon Carbon基本用法 //2、判断是否是某一天(2016-11-03(周四)举例) $now = ...[详细]
-
PHPExcel中文帮助手册|PHPExcel使用方法(分享)
[PHP教程] 2021-01-19 01:09:18 138人阅读
下面是总结的几个使用方法 save("xxx.xlsx");直接输出到浏览器$objWriter = new PHPExcel_Writer_Excel5($objPHPExcel);header("Pragma: public");header("Expires: 0″);header("Cache-Control:must-revalidate,pos...[详细]
-
使用PHPExcel实现数据批量导出为excel表格的方
[PHP教程] 2021-01-18 16:27:07 51人阅读
首先需要下载PHPExecel类文件,帮助文档可以参考 下面直接上例子,是我自己写的一个简单的批量导出数据为excel的例子 前台页面 比较简单,就是一个超链接,跳转到处理页面,超链接也可以跟一些参数(看需求)! 后台...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]