-
php如何修改SESSION的生存存储时间的实例代码
[PHP教程] 2021-02-04 07:00:59 130人阅读
如何修改SESSION的生存时间 我们来手动设置 Session 的生存期: 其实 Session 还提供了一个函数 session_set_cookie_params(); 来设置 Session 的生存期的,该函数必须在 session_start() 函数调用之前调用: 如果客...[详细]
-
PHP实现根据密码长度显示安全条
[PHP教程] 2021-02-04 06:56:33 116人阅读
本文给大家分享一段简单的代码,实现根据密码长度显示安全条功能,代码如下所示: 密 码: function pwStrength(pwd){ O_color="#eeeeee"; L_color="#FF0000"; M_color="#FF9900"; H_color="#33CC00"; if (pwd==null...[详细]
-
PHP截取发动短信内容的方法
[PHP教程] 2021-02-04 06:52:19 138人阅读
废话不多说了,直接给大家贴代码了,具体代码如下所示: 1) { $str = $str . "{$num}/{$total}"; $num ++; } $sign = strtoupper(md5($key.$pMobile.$str.$ip)); $url = "短信地址?from=37tel=".$pMobile." $ret = f...[详细]
-
PHP实现的分页类定义与用法示例
[PHP教程] 2021-02-04 06:48:42 170人阅读
本篇章节讲解PHP实现的分页类定义与用法。分享给大家供大家参考,具体如下: total = $_total ? $_total : 1; $this->pagesize = $_pagesize; $this->pagenum = ceil($this->total / $this->pagesize); $this->page ...[详细]
-
PHP实现的文件上传类与用法详解
[PHP教程] 2021-02-04 06:43:38 106人阅读
本篇章节讲解PHP实现的文件上传类与用法。供大家参考研究具体如下: FileUpload.class.php,其中用到了两个常量,可在网站配置文件中定义:define('ROOT_PATH',dirname(__FILE__)); //网站根目录、define('UPDIR','/...[详细]
-
PHP基于GD库实现的生成图片缩略图函数示例
[PHP教程] 2021-02-04 06:39:28 178人阅读
本篇章节讲解PHP基于GD库实现的生成图片缩略图函数。供大家参考研究具体如下: 注:记得先打开 GD 库的支持 更多关于PHP相关内容感兴趣的读者可查看本站专题:《》、《》、《》、《》、《》及《》 希望本文所述对大...[详细]
-
PHP实现的下载远程文件类定义与用法示例
[PHP教程] 2021-02-04 06:32:48 177人阅读
本篇章节讲解PHP实现的下载远程文件类定义与用法。分享给大家供大家参考,具体如下: m_url = $url; if(is_array($urls)) { $this->m_host = $urls["host"]; if(!empty($urls["scheme"])) $this->m_scheme = $urls["...[详细]
-
PHP 实现从数据库导出到.csv文件方法
[PHP教程] 2021-02-04 06:31:39 200人阅读
PHP 实现从数据库导出到.csv文件方法 实现代码: 1,"pay_type...[详细]
-
php文件上传类的分享
[PHP教程] 2021-02-04 06:30:54 102人阅读
本文实例为大家分享了php文件上传类的具体代码,供大家参考,具体内容如下 uploadFile('fm...[详细]
-
PHP图片水印类的封装
[PHP教程] 2021-02-04 06:30:22 76人阅读
封装PHP的图片水印的类,供大家参考,具体内容如下 water('2a.jpg','logo.gif',0);class Image{ //路径 protected $path; //是否启用随机名字 protected $isRandName; //要保存的图像类型 protected $type; //通过构...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]