-
PHP运用apc实现上传进度条方法
[PHP教程] 2022-02-13 14:21:43 88人阅读
php本身是不具备可以带有实时上传进度条功能了,如果想有这种功能我们一般会使用ajax来实现,但是php提供了一个apc,他就可以与php配置实现上传进度条. 主要针对的是window上的应用. 1.服务器要支持apc扩展,没有此扩展...[详细]
-
php小偷程序示例代码
[PHP教程] 2022-02-13 14:21:14 149人阅读
小偷程序其实就是利用了php中的一特定函数实现采集别人网站的内容,然后通过正则分析把我们想要的内容保存到自己本地数据库,下面我来介绍php小偷程序的实现方法,有需要的朋友可参考. 在下面采集数据过程中file_get_co...[详细]
-
php里fsockopen采集网页内容实例
[PHP教程] 2022-02-13 14:20:43 74人阅读
fsockopen是php中一个比较实用的函数了,下面我来介绍利用fsockopen函数来采集网页的程序. 用法:int fsockopen(string hostname,int port,int [errno],string [errstr],int [timeout]); 一个采集网页实例,代码如下: ?...[详细]
-
PHP里利用APC模块完成文件上传进度条
[PHP教程] 2022-02-13 14:20:14 148人阅读
以前的php5.2之前的版本是不能可使用APC模块的,因为之前的压根就没有这个APC模块,如果想使用APC模块实现上传进度条我们必须是php5.2或更高版本. 从5.2开始APC加入了一个叫APC_UPLOAD_PROGRESS的东东,解决了困扰大家...[详细]
-
php无限级分类 带层深 算法
[PHP教程] 2022-02-13 14:19:52 50人阅读
一个利用数组来实现无限级分类php类程序,有需要的朋友可参考,这里就不多说什么了直接复制上代码. php无限级分类(带层深)算法实例代码如下: ?php $cates = array( array( cid = 1, cname = 新闻, pid = 0 ), array( c...[详细]
-
PHP产生带LOGO的二维码图像
[PHP教程] 2022-02-13 14:19:31 199人阅读
现在二维码是我们一些软件站或下载站常用的一种东西了,特别是微信都会使用二维码来加好友,下面我来介绍利用php生成二维码多种方法. 方法一,这种生成就是一个二维码中间不带图片的,直接调用google的一个功能就实现了,...[详细]
-
php里获取中文首字母程序代码
[PHP教程] 2022-02-13 14:19:00 187人阅读
我们经常会看到一些网站按城市名来分或按字母来排名,下面我就来介绍这个东西如何实现的吧,我们分享一段利用php取得中文字符串中第一个汉字的字母,代码如下: ?php $limit = array( //gb2312 拼音排序 array(45217,452...[详细]
-
php里include require utf-8文件时顶部产生空行
[PHP教程] 2022-02-13 14:17:49 182人阅读
include()产生一个警告而require()则导致一个致命错误,换句话说,如果想在遇到丢失文件时停止处理页面就用require(),include()就不是这样,脚本会继续运行,同时也要确认设置了合适的include_path,注意在 PHP 4.3.5之前...[详细]
-
php QQ第三方登陆SDK程序代码
[PHP教程] 2022-02-13 14:17:14 126人阅读
自己重写的一个php QQ第三方登陆SDK程序代码,官方的不敢恭维了所以自己再写了一个,主要是考虑到QQ的PHP SDK写的真是太烂了,纯属是普及API知识,而不是到手就可以部署的类库,反正自己都写了一个了,就拿出来分享下. 什...[详细]
-
PHP中奖概率的抽奖算法程序代码
[PHP教程] 2022-02-13 14:16:45 112人阅读
1.可以控制中奖的概率,2.具有随机性,3.最好可以控制奖品的数量,4.根据用户ID或者ip、手机号、QQ号等条件限制抽奖次数 初期就这些需求,然后根据网上的资料,采用了一种阶段式抽取的方法,大家下面看一下整体的程序.该程...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]