-
PHP无限分类实例程序
[PHP教程] 2022-02-13 14:26:02 128人阅读
无限分类的原理:就像windows下新建一个文件夹,在新建的文件夹下又可以新建一个文件夹,这样无限循环下去,无限分类也是这样,父类可以分出它子类,子类又可以分出它的子类,这样一直无限循环下去. 例1,代码如下: $yArr = ...[详细]
-
php产生二维码程序代码
[PHP教程] 2022-02-13 14:25:40 141人阅读
生成二维码程序在网上可以找到很多我们发现像google,还有一些国外站都提供了免费生成二维码的插件或api了,下面我来给大家介绍几种. 最简单最实例的goolge开源方法. 1.google开放api,例代码如下: $urlToEncode=http:/...[详细]
-
PHP操作MongoDB配置和学习笔记
[PHP教程] 2022-02-13 14:25:17 52人阅读
1,PHP操作MongoDB配置与学习笔记有需要的朋友可参考参考,Mongo主要解决的是海量数据的访问效率问题,根据官方的文档,当数据量达到50GB以上的时候,Mongo的数据库访问速度是MySQL的 10倍以上. 2,安装(windows only) ...[详细]
-
php里CURL实现模拟登录并采集数据
[PHP教程] 2022-02-13 14:24:56 100人阅读
在php中采集我们用的是简单的采集方式,例如file_get_contents就无法做到了,但是如果想模拟登录用户并采集利用它就没办法了,我们可利用CURL函数来实现模拟登录并采集数据. 这里要说一些,默认情况下,PHP的CURL功能是没...[详细]
-
php上传Excel文件时怎样判断文件中有图片
[PHP教程] 2022-02-13 14:24:39 84人阅读
php上传Excel文件时如何判断文件中有图片,实例代码如下: $excelPath = Test.xls; $objReader = PHPExcel_IOFactory::createReader(Excel5); $objReader-setReadDataOnly(true); //开源代码Cuoxin.com $objPHPExcel =...[详细]
-
php内存缓存完成程序代码
[PHP教程] 2022-02-13 14:24:22 154人阅读
在php中缓存分为很多种类型如,内存缓存,文件缓存,页面缓存本文章要来讲述关于php中内存缓存的一些方法,下面我们介绍Memcached缓存和php自带的APC缓存方法. 1.Memcached缓存。 memcached是高性能的分布式内存缓存服务...[详细]
-
php里文件缓存实现程序代码
[PHP教程] 2022-02-13 14:23:48 198人阅读
php文件缓存就是指把缓存生成一个文件,这个文件可以是php,txt等等文件,当我下载访问时就来判断访问上次生成时间,如果超过了我们指定的时间再重新生成一次,否则就直接调用缓存文件,这样就可以减少了对mysql数据库的查...[详细]
-
PHP手机号归属地查找程序代码
[PHP教程] 2022-02-13 14:23:20 136人阅读
本文章总结了两个常用的手机归属地查询程序,一种是利用api调用第三方接口实现,一种是利用我们自己的手机数据库查询然后再判断手机号归属地查询. 先来看一个调用第三方法网站的一个程序,主要使用curl实现,需要开启php...[详细]
-
PHP错误处理方法汇总
[PHP教程] 2022-02-13 14:22:31 69人阅读
在php中错误处理的方法有很多,特别是到了php5之后还提供了专门的php处理类,下面我收藏了关于PHP错误处理一些方法与程序分享给大家. 在程序中直接判断,基本的错误处理:使用 die() 函数,第一个例子展示了一个打开文本...[详细]
-
php运用PHPExcel类导出导入Excel用法
[PHP教程] 2022-02-13 14:22:05 160人阅读
PHPExcel类是php一个excel表格处理插件了,下面我来给大家介绍利用PHPExcel类来导入与导出excel表格的应用方法,有需要了解的朋友不防参考参考,PHPExcel自己百度下载这里不介绍了. 导出Excel用法,代码如下: //设置环境...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]