-
PHP程序出错页面空白 没有错误提示怎么处理?
[PHP教程] 2022-02-18 15:03:44 109人阅读
php页面空白我们从几个方法入手,一个是php把错误提醒功能给关闭了,另一个是程序没有返回结果,当然如果是使用了php操作数据库我们可以数据库报错未进行判断处理,下面我们从这三个方法来给大家分析php页面空白不报错解...[详细]
-
php藏匿IP地址后两位显示为星号例子
[PHP教程] 2022-02-18 15:03:21 136人阅读
我们在很多的公共网站中都会有碰到显示用户的IP时后面几个IP段显示为星号了,这样很好的保护了用户隐私了,下面我总结了些例子,大家看看吧. php正则格式化IP地址,隐藏后一位,代码如下: ?php //隐藏后一位 return preg_...[详细]
-
PHP产生不重复标识符程序代码
[PHP教程] 2022-02-18 15:02:51 117人阅读
生成唯一不重复的标识我们主要是根据当前的一个时间time然后再转换在md5值,这样几乎是可以保证标签的唯一性了,下面整理了一些关于PHP生成不重复标识符程序代码,希望能各位有帮助. PHP倒是自带了生成唯一id的函数:uni...[详细]
-
php里try catch 捕获异常的例
[PHP教程] 2022-02-18 15:02:14 199人阅读
php中try catch可以帮助我们捕获程序代码的异常了,这样我们可以很好的处理一些不必要的错误了,下面本文章总结了捕获异常的一些用法例子. PHP中try{}catch{}语句. PHP 5 添加了类似于其它语言的异常处理模块,在 PHP ...[详细]
-
PHP生成二维码,运用PHP QR Code二维码生成类库
[PHP教程] 2022-02-18 15:01:40 61人阅读
PHP生成二维码例子我们使用到了PHP QR Code类库来生成了,有了它我们生成二维码就像echo a这么简单了,下面来给各位介绍一下吧. 以前使用Google提供了较为完善的二维码生成接口,调用API接口很简单,但是现在由于访问goo...[详细]
-
php检测数据是否是json字符
[PHP教程] 2022-02-18 15:01:07 136人阅读
检测返回的数据是不是json格式的数据我们可以使用几个方法来判断,下面我整理了一些比较实用的检测json字符串是不是json格式的例子,希望例子能帮助各位带来帮助. 首先要记住json_encode返回的是字符串,而json_decode...[详细]
-
PHP嗅探youku视频的真实flv文件地址
[PHP教程] 2022-02-18 15:00:42 140人阅读
认识几个做视频网站的站长他们的视频电影都是来自于我们国内的几大视频网站了,有一站长要我帮助它做一个可以自动测试出youku视频网站的flv真实地址,下面我整理了一下午解决了此问题非常的不错,大家可参考一下. 这个...[详细]
-
php完成refresh刷新页面进入批量导入数据
[PHP教程] 2022-02-18 15:00:22 186人阅读
我的这个功能的原因是参考dedecms生成html页面的原理,只是dedecms使用的是js跳转而我使用的是refresh进行跳转,效果是一样的,下面我们一起来看一个php实现批量导入数据的方法. 因为我有1000W数据一次导入数据库肯定是...[详细]
-
php pdo连接并查找sql数据库代码
[PHP教程] 2022-02-18 14:59:24 121人阅读
$login = root; $passwd = mysql; try{ $db=new pdo(mysql:host=localhost;dbname=mysql,$login,$passwd); foreach($db-query(select * from test) as $row){ print_r($row); } $db=null; }catch(pdoexception $e){ ...[详细]
-
php 连接odbc数据源并保存,查找数据
[PHP教程] 2022-02-18 14:58:46 126人阅读
$connstr = driver=microsoft access driver (*.mdb);dbq=.realpath(db.mdb); $connid = odbc_connect($connstr,,,sql_cur_use_odbc); $odbc_exec = odbc_exec($connid, insert into tablename (name) values(name))...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]