-
php curl 检查百度是不是收录文章的例子
[PHP教程] 2022-01-21 14:02:33 81人阅读
发的文章如果我每一篇都是手工查的话是非常的累的,这里可以利用一个简单的php函数来帮我们实现自动检测,下面我们就利用php curl来做一个模仿用户去访问百度的wgbb例子,希望此例子对各位会有所帮助. 只要在主题的func...[详细]
-
php实现对css文件进行压缩与解压缩
[PHP教程] 2022-01-21 14:02:12 147人阅读
下面用php实现了一个对css进行压缩和解压缩的小程序,暂不适用于js的操作,通过这个案例可以学习php字符替换和正则替换的技术. 将css代码压缩能够减小文件的体积,从而减小了网络传输量和带宽占用,减小了服务器的处理的...[详细]
-
PHP让16进制的编码转为中文程序代码
[PHP教程] 2022-01-21 14:01:52 85人阅读
今天在做公司的项目的时候,遇到一个问题,群聊天记录存入数据库的时候把聊天记录及央视使用16进制转换,我在做将聊天记录导出为text文本的时候,需要将聊天记录先从16进制转换为普通的Unicode编码记录. 然后在从中取出...[详细]
-
PHP运用Curl模拟登录并获取数据例子
[PHP教程] 2022-01-21 14:01:26 145人阅读
PHP的curl()在抓取网页的效率方面是比较高的,而且支持多线程,而file_get_contents()效率就要稍低些,当然,使用curl时需要开启下curl扩展. 先来看登录部分的代码: //模拟登录 function login_post($url, $cookie, $pos...[详细]
-
PHP批量更改静态html文件编码的例子
[PHP教程] 2022-01-21 14:01:06 76人阅读
一堆的文件编码都是ANSI的,本来想用linux shell批量修改文件编码,却不太熟悉,写了个PHP脚本批量修改html文件的编码,代码如下: ?php //1.遍历出所有html文件 $dir = ./jquery/jquery/; //文件目录、 $move_to = ./jqu...[详细]
-
php完成a到z及其中的 奇怪现象
[PHP教程] 2022-01-21 14:00:45 83人阅读
版本一: for($i=ord(a); $iord(z); $i++) { echo chr($i); } 版本二(与第一版类似使用ascii): for($i=0; $i26; $i++) { echo chr($i+97); } 版本三:echo implode(, range(a, z)); 版本四(高智商坑爹版): for($i=a; $...[详细]
-
PHP中Soap模块安装和使用例子
[PHP教程] 2022-01-21 14:00:12 192人阅读
PHP的SOAP扩展可以用来提供和使用Web services,换句话说,PHP开发者可以利用这个PHP扩展来写他们自己的Web services,也可以写一些客户端来使用给定的Web services. PHP5中的这个SOAP扩展目的是为了实现PHP对Web servi...[详细]
-
php5.3中php-fpm进程管理方法
[PHP教程] 2022-01-21 13:59:48 193人阅读
目前最新5.3.x的php-fpm,有两种管理进程的方式,分别是static和dynamic,如果设置成static,进程数自始至终都是pm.max_children指定的数量,pm.start_servers,pm.min_spare_servers,pm.max_spare_servers配置将没...[详细]
-
phpmailer使用163邮箱发送邮件例子
[PHP教程] 2022-01-21 13:59:06 163人阅读
phpmailer是一款免费的php邮件发送插件,我们可以利用phpmailer登录到我们指定的邮件然后再利用这个邮件给我们自动发邮件了,这个现在免费的邮箱像163,sina都支持,只是sina需要简单的打开pop3协义了,好了费话不说多了...[详细]
-
php计划任务的实现例子介绍
[PHP教程] 2022-01-21 13:58:45 144人阅读
最近由于项目需要定时对远程数据库上做一些处理,这里就需要做一个计划任务样子的东西了,经过努力,终于使用php实现了这个计划任务,下面分享一下此次的实现过程. 本次使用php实现计划任务主要使用了 ignore_user_abort...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]