PHP从主流来看,是一门面向过程的语言,它的最大缺点就是无法实现多线程管理,其程序的执行都是从头到尾,按照逻辑一路执行下来,不可能出现分支,这一点是限制php在主流程序语言中往更高级的语言发展的原因之一。 在PHP中我们有的时候其实希望在执行某项操作的时候,同时去执行另外一项操作,举一个场景:在用户抢票的...
日期:2021-12-25 浏览:1259次 评论: 0 阅读全文
基于网上的一段代码,修改完善后封装了一个支持POST/GET的非阻塞调用类。 欢迎测试bug~~~~~ /*****************************************************  CURL 非阻塞调用类  Auther: Linvo  Copyright(C) 2010/10/21 *******************************************************/ /* &...
日期:2021-12-25 浏览:1349次 评论: 0 阅读全文
Group by,where,having 是数据库查询中最常用的几个关键字。在工作中,时常用到,前面遇到一个问题,一个查询中使用了where ,group by ,having及聚集函数时 ,执行顺序是怎么样的?为了回答这个问题,将这个三个关键字的用法整理一下。 Where:数据库中常用的是Where关键字,用于在初始表中筛选查询。如下面这个例子,...
日期:2021-12-16 浏览:1303次 评论: 0 阅读全文
<?php  /*  *  * @param string $title_1 题目1  * @param string $title_2 题目2  * @return float $percent 相似百分比  */ function title_similar($title_1,$title_2) {   $title_1&nbs...
日期:2021-12-07 浏览:1356次 评论: 0 阅读全文
function CreateThumbs($image_path,$thumb_width,$thumb_height,$thumb_pro,$thumb_path,$ml=1,$thumb_quality=100){    if ($thumb_path!=''){    /*    $thumb_array=explode('/',$thumb_path);    if (count($th...
日期:2021-12-02 浏览:1295次 评论: 0 阅读全文
function CreateThumbs($image_path,$thumb_width,$thumb_height,$thumb_pro,$thumb_path,$ml=1,$thumb_quality=100){    if ($thumb_path!=''){    /*    $thumb_array=explode('/',$thumb_path);    if (count($th...
日期:2021-11-30 浏览:1345次 评论: 0 阅读全文
查看进程就是使用ps命令而已,只不顾ps的参数太多了。   使用php查询的话,必须要开启几个函数(可以执行外部程序的函数),参考官网:http://php.net/manual/zh/book.exec.php   下面是在php进程中查询某个服务创建的进程数,比如httpd,mysqld,sshd....... <?php     functio...
日期:2021-11-28 浏览:1356次 评论: 0 阅读全文
$url = "https://www.xxx.com"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); //请求url地址     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //设置获取页面内容     curl_setopt($ch,&n...
日期:2021-11-22 浏览:1819次 评论: 0 阅读全文
今天的所有数据:select * from 表名 where DateDiff(dd,datetime类型字段,getdate())=0 昨天的所有数据:select * from 表名 where DateDiff(dd,datetime类型字段,getdate())=1 7天内的所有数据:select * from 表名 where DateDiff...
日期:2021-11-16 浏览:1497次 评论: 0 阅读全文
[mysqld] ########基础设置-基础########5.7.17server-id = 1port      = 3306user      = mysql ########基础设置-目录######## log_error = /var/log/mysqld.log tmpdir    = /tmp pid...
日期:2021-11-14 浏览:1404次 评论: 0 阅读全文