-
php把URL地址转化为完整的A标签链接代码
[PHP教程] 2022-01-21 14:13:09 98人阅读
前面介绍过js把文本链接转换成A标签,现在看一个php的方法,这个是在 Silva 代码的基础上修改的,如果有不完善的地方大家可提出来. 需要提取的内容如下: a href=http://baidu.comhttp://baidu.com/a这是第一个A标签, a...[详细]
-
php里浮点数计算问题整理
[PHP教程] 2022-01-21 14:12:42 95人阅读
如果用php的+-*/计算浮点数的时候,可能会遇到一些计算结果错误的问题,比如echo intval( 0.58*100 );会打印57,而不是58,这个其实是计算机底层二进制无法精确表示浮点数的一个bug,是跨语言的,我用python也遇到这个问题...[详细]
-
php-screw在php5.4.6里编译失败问题
[PHP教程] 2022-01-21 14:12:15 161人阅读
今天在要php5.4.6中编译安装一个php-screw了,但是怎么操作都不成功了,后来看到有朋友博客写到一篇关于php-screw在php5.4.6上编译失败问题的解决方案,于是拿过来试了一下没想到还真解决了,下面我把文章拿出来与大家一...[详细]
-
PHP查询ip所在地的几种办法
[PHP教程] 2022-01-21 14:11:47 141人阅读
根据IP地址查找我们的IP地址所在地,这个最简单办法就是直接把ip在百度搜索就可以知道你的IP地址所在地了,但对于一些网站我们不能使用此方法,但可以通过api来实现. 例子,利用第三方接口实例,代码如下: form action= m...[详细]
-
PHP程序循环迭代里谨慎操作数据库
[PHP教程] 2022-01-21 14:11:26 75人阅读
PHP草根滴我们,一直以为数据库是万能,为了实现功能却很少去考虑效率与数据库瓶颈问题,比如在一个循环中查询数据库,一个迭代方法中查询数据库都是非常不可取滴,尤其是前端程序,在访问量不大,并发少时看不出任何问题,...[详细]
-
php里curl模拟登陆客户百度知道的例子
[PHP教程] 2022-01-21 14:10:54 111人阅读
最近弄了一个工具,希望能获取自己百度网盘里面的数据但又不想公开数据,于是想到了模拟登陆百度,用常规的模拟登陆测试了下发现不行,抓取登陆时的数据才发现,其实百度登陆过程中跳转了几次页面,如果仅仅对http://passp...[详细]
-
php限制IP与IP段的代码
[PHP教程] 2022-01-21 14:09:43 65人阅读
php限制IP段代码是我在网上搜相关解决方法时搜到的,这个类的makePregIP函数逻辑有点问题,我修改了下可以使用了,这个类得功能是允许白名单中的IP地址访问,如果要实现限制黑名单中的IP地址访问,简单修改下checkIP函数...[详细]
-
php自定义加密函数 解密的例子
[PHP教程] 2022-01-21 14:09:10 167人阅读
加密就是将一些字符转换为另一个字符串的过程,简单的说就是把大门上锁,并且只有你有开启的钥匙,作为一个程序员都应该有属于自己的加密方式,目前最流行的加密算法就是MD5()加密方式,但是在网站已经有了破解的软件用...[详细]
-
php+ajax完成select分类二级菜单效果
[PHP教程] 2022-01-21 14:08:11 145人阅读
html代码如下: select id=teId name=te_id onchange=getArea() option value=1000--请选择分类--/option option value=1房产知识/option option value=8房屋买卖/option option value=16法律法规/option option valu...[详细]
-
PHP多线程 pthreads 参数传递学习笔记
[PHP教程] 2022-01-21 14:07:38 166人阅读
看了几个短网址API服务,于是把它们整理出来,方便以后使用,目前,提供靠谱的短网址API接口的公司不多(谷歌、百度、新浪微博、网易等),而像腾讯微博、淘宝这几个巨头的短网址服务都是仅供内部使用. 1 谷歌、百度、网易...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]