-
php使用imagick给图片加水印的办法
[PHP教程] 2022-02-23 15:32:35 84人阅读
?php $image = new Imagick(); $image-readImage(original.jpg); $watermark = new Imagick(); $watermark-readImage(/data/mark.png); // how big are the images? $iWidth = $image-getImageWidth(); $iHeight = $...[详细]
-
php如何运行存储过程?php存储过程调用实例代码
[PHP教程] 2022-02-23 15:32:11 107人阅读
代码如下: //比如要调用的存储过程为gxtj(a,b) $db=new mysqli(localhost,ssss,aaaaa,bbbb); mysqli_query($db,SET NAMES utf8); $result=$db-query(call gxtj($year,$jd)); // gxtj是mysql的存储过程名称 [color=gr...[详细]
-
php怎么安装redis扩展?redis安装以及php扩展的
[PHP教程] 2022-02-23 15:31:38 192人阅读
启动安装:http://elain.blog.51cto.com/3339379/705846 redis下载:ps://github.com/nicolasff/phpredis/downloads https://github.com/nicolasff/phpredis/downloads 多台服务安装:http://www.vquickphp.com/?a=blog...[详细]
-
简单谈谈PHP里的trait
[PHP教程] 2022-02-23 15:31:17 114人阅读
前言:之前的一个同事换工作,在面试被问到了 PHP 的 trait 。因为没用过, 所以没答好,我大概是用过几次的,想了想整理了以下的总结。 trait:trait 是在一些类(Class)的应该具备的特定的属性或方法,而同父级的另外...[详细]
-
php PDO实现的事务回滚实例
[PHP教程] 2022-02-23 15:30:54 50人阅读
$servername=localhost; $username=root; $password=admin; $dbname=test; try{ $conn=new PDO(mysql:host=$servername;dbname=$dbname,$username,$password); $conn-setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_E...[详细]
-
PHP基于ffmpeg实现转换视频,截图及生成缩略图
[PHP教程] 2022-02-23 15:30:31 175人阅读
这里把ffmpeg 和 生成缩略图整合了一下: include(ImageResize.class.php) //转视频 $cmd=ffmpeg.exe -i starwar.avi -ab 56 -ar 22050 -b 500 -r 15 -s 320x240 1.flv; exec($cmd); //视频截图 $cmd=ffmpeg.exe -i ...[详细]
-
PHP实现生成vcf vcard文件功能类定义与使用方法
[PHP教程] 2022-02-23 15:29:55 170人阅读
本文实例讲述了PHP实现生成vcf vcard文件功能类定义与使用方法。分享给大家供大家参考,具体如下: 前面介绍了php读取vcf文件的方法,这里再来研究一下vcf文件的生成方法。 VCF格式是Windows系统中outlook的名片存储...[详细]
-
运用PHP实现开心消消乐的算法示例
[PHP教程] 2022-02-23 15:29:24 117人阅读
本文主要介绍了关于PHP如何实现我们大家都知道的开心消消乐的算法,分享出来供大家参考学习,下面话不多说了,来一起看看详细的介绍吧。 一、需求描述: 1、在一个8*8的矩阵方格中随机出现5种颜色的色块。 2、当有三...[详细]
-
PHP多进程之pcntl_fork的实例解析
[PHP教程] 2022-02-23 15:28:39 163人阅读
PHP多进程编之pcntl_fork的实例详解 其实PHP是支持并发的,只是平时很少使用而已。平时使用最多的应该是使用PHP-FMP调度php进程了吧。 但是,PHP的使用并不局限于做Web,我们完全也可以使用PHP来进行系统工具类的编...[详细]
-
PHP中STDCLASS的使用方法详解
[PHP教程] 2022-02-23 15:27:43 157人阅读
PHP中STDCLASS在我们开发应用中使用到的不多,但是PHP中STDCLASS作用是非常的大的,下面我们一起来看PHP中STDCLASS的用法. 在WordPress中很多地方使用stdClass来定义一个对象(而通常是用数组的方式),然后使用get_objec...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]