-
php多线程的几点思考
[PHP教程] 2022-02-23 14:39:10 55人阅读
在php中实现多线程对于很多朋友来讲都觉得不中java做得到位了,这个也确实是如何了,下面我们一起来看看php多线程的几个例子. PHP中有没有办法在实现多线程呢?假设你正在写一个基于多台服务器的PHP应用,理想的情况时...[详细]
-
php管理nginx虚拟主机shell脚本
[PHP教程] 2022-02-23 14:38:47 59人阅读
下文整理了一段php管理nginx虚拟主机shell脚本,希望这段脚本能帮助到各位同学,使用php作为shell脚本是一件很方便的事情,理所当然,我们可以使用php脚本来管理 nginx虚拟主机,下面是笔者的 脚本 文件供各位参考,代码如...[详细]
-
PHP tclip扩展调用opencv从内存中读取及解析图
[PHP教程] 2022-02-23 14:38:30 114人阅读
前两天蛮说有一个PHP扩展,tclip图片裁剪程序,Tclip致力于人脸识别和图片显著性区域的识别,它与其他图片裁剪程序最大的不同之处在于,在裁剪后的图片中保留人脸和其他图片显著性区域,不过还是图片裁剪. tclip这个扩展...[详细]
-
PHP异步执行实现的四种方法详解
[PHP教程] 2022-02-23 14:38:15 153人阅读
异步执行的方法有很多种在这里我们整理了一些常用的函数来实现异步执行了,同时也包括大家熟知ajax了,当然本文章重点不在ajax而相关的php函数了,下面一起来看看. PHP异步执行的常用方式: 1.AJAX 1.最简单的办法,就是...[详细]
-
同时ping多个ip找了最快的ip网的php实例
[PHP教程] 2022-02-23 14:37:57 157人阅读
本文我们来分享一段可以同时ping多个ip然后对比找出网络最快的ip的php程序,这段程序用来找代理ip可是神器,为了翻墙方便,买了个vpn,转到osx下面官方没有提供合适的客户端,无法选择最快的线路,于是就自己写了个脚本,手...[详细]
-
PHP接口开发加密技术实例原理与例子
[PHP教程] 2022-02-23 14:37:41 186人阅读
在手机中使用PHP接口与web对接时我们会做一个加密的值进行握手验证了,下面我们就来为各位介绍一些方法与原理了. 方法一:固定一个值,如md5(www.Cuoxin.com) 然后把生成的字符在url或post传递时进行验证. 方法二:稍微...[详细]
-
PHP下使用富文本过滤器 HTML Purifier 防止xss
[PHP教程] 2022-02-23 14:36:42 129人阅读
CMS为了文章编辑内容,都会在后台集成在线编辑器,如FCKEditor等,但是这种很容易XSS跨站攻击,以下我们来看一下使用 HTML Purifier 如何防止xss跨站攻击. 随着html可视即可得编辑器的流行,很多网站使用了这样的编辑器,...[详细]
-
php如何跨域提交form表单?本文介绍2种方法
[PHP教程] 2022-02-23 14:36:19 126人阅读
有时我们为了网站安全考虑,我们不允许直接跨域提交form表单数据,如果我们自己有这个需求呢?下面我们来介绍两种跨域的方法解决直接跨域问题. 下面我们来看看两种php跨域提交form的方法. 一,通过php curl function c...[详细]
-
PHP单例模式汇总教程
[PHP教程] 2022-02-21 16:12:05 97人阅读
以前我们讲过php单态设计模式之单例模式的理解及单例模式(Singleton)的常见应用场景,现在我们在原来的基础上总结一下。 这些场景的共同特征是从业务逻辑上来看运行期间改对象却是只需要一个实例、不断new多个实例会...[详细]
-
php curl伪造referer与来源IP示例
[PHP教程] 2022-02-21 16:11:31 186人阅读
php curl伪造referer与来源IP非常的简单,今天做一个图片采集的也有做过,下面我把两个例子都整理一下,供大家参考. 例子1,代码如下: ?php $post_data = array ( user = gongwen, pwd = 123456 ); $header_ip = array( ...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]