-
PHPExcel 修改已存在Excel的方法
[PHP教程] 2021-05-18 16:02:01 71人阅读
如下所示: getSheet(0); // 读取第一個工作表 $highestColumm = $sheet->getHighestColumn(); // 取得总列数 $highestRow = $sheet->getHighestRow(); // 取得总行数 /** 循环读取每个单元格的数据 */ $i = 2; fore...[详细]
-
PHP 计算两个特别大的整数实例代码
[PHP教程] 2021-05-18 15:49:05 96人阅读
废话不多说了,具体代码如下所示: = 0;$i--){$aVal = $count - $i 0 strlen($c) >= $count - $i){$c = ($v + intval($c[0])).substr($c,1,strlen($c) - 1);}else{$c = $v.$c.'';}}return $c;}$a = '234902343284902...[详细]
-
详解PHP发送邮件知识点
[PHP教程] 2021-05-18 15:48:00 52人阅读
发送邮件是网站的常用功能,用户激活、找回密码等场景常需要发送邮件到用户邮箱。本文先回顾发送邮件的相关概念,再给出使用PHP发送邮件的示例代码。 发送短信 从功能上看,短信和邮件类似,用途常是通知和安全校验...[详细]
-
为你解析PHP mysqli_query:执行SQL语句
[PHP教程] 2021-05-18 06:06:09 84人阅读
参数说明: $query:要执行的 SQL 语句; $resultmode:可选参数,用来修改函数的行为。可以是下列值的任意一个: MYSQLI_USE_RESULT(如果需要查询大量数据,使...[详细]
-
PHP得到SQL的查询结果
[PHP教程] 2021-05-18 05:45:12 80人阅读
在 PHP 中处理数据结果集的函数主要有以下几个: mysqli_fetch_row():从结果集中取得一行,并以索引数组的形式返回; mysqli_fetch_assoc():从结果集中取得一...[详细]
-
PHP PDO的解释
[PHP教程] 2021-05-18 05:03:46 182人阅读
PDO 是什么 PDO 是 PHP Date Object(PHP 数据对象)的简称,它是 PHP 为访问数据库定义的一个轻量级的、一致性的接口,它提供了一个数据访问抽象层,这样无论你...[详细]
-
PHP怎样利用PDO连接数据库
[PHP教程] 2021-05-18 05:02:51 180人阅读
创建 PDO 对象 可以以多种方式调用构造方法创建 PDO 对象,下面以连接 MySQL 数据库为例,为大家介绍构造方法的多种调用方式。 1) 将参数嵌入到构造函数中 在下...[详细]
-
PHP如何运用PDO运行SQL语句
[PHP教程] 2021-05-18 05:01:52 118人阅读
1) exec() 方法 当执行 INSERT、UPDATE 和 DELETE 等不需要返回结果集的 SQL 语句时,可以使用 PDO 对象中的 exec() 方法。该方法成功执行后,将返回受影响的行...[详细]
-
PHP fopen和fclose怎么做到打开和关闭文件
[PHP教程] 2021-05-18 05:01:12 140人阅读
在对文件进行操作之前,服务器上的操作系统必须知道要对打开的文件进行什么操作。操作系统需要了解在打开这个文件后,这个文件是否还允许其他脚本再打开,它还需...[详细]
-
解析PHP imagecreatetruecolor和imagecreate中
[PHP教程] 2021-05-18 04:46:29 147人阅读
在 PHP 中,通过 GD 库处理图像的操作,都是先在内存中处理,操作完成以后再以文件流的方式,输出到浏览器或保存在服务器的磁盘中。创建图像一般分为 4 个基本步...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]