-
php读取excel日期类型数据的示例
[PHP教程] 2022-02-16 16:43:01 179人阅读
Excel中的日期,php读取之后,变成了类似25569这样的数字,而不是Excel中显示的1970-1-1字符形式,原来excel中的日期是个1900-1-1开始的数字格式,比如1900-1-1是1,1970-1-1是25569. 提供一个读取的函数,代码如下: //exce...[详细]
-
php中删掉数据库数据例子
[PHP教程] 2022-02-16 16:42:30 147人阅读
php除了删除文件目录不用用到mysql中的delete之外只要删除mysql数据库中的数据都要用到数据库的命令了,下面我看利用delete来删除数据的例子. 语句:DELETE FROM table_name WHERE column_name = some_value 解说:查询...[详细]
-
PHP把excel xls 文件导进mysql数据库
[PHP教程] 2022-02-16 16:42:02 188人阅读
excel导入mysql数据库我整理了两种办法,一种就是使用PHP-ExcelReader来导入,另一种是把excel转换成csv文件直接使用php相关函数导入即可. 昨晚一个客户联系我做网站,提出的要求是需要把客户提供的excel文件里面的数...[详细]
-
PHP+MYSQL 出现乱码问号的解决办法
[PHP教程] 2022-02-16 16:41:37 165人阅读
php与mysql密码多半与php是没有任何关系了,这个我们只要把页面与mysql编码进行处理即可解决乱码问题,乱码也只是中文会乱码了. 使用PHP+MYSQL时遇到过字符乱问题,解决方法:在mysql_connect后面加一句SET NAMES UTF8,...[详细]
-
php向Mysql数据库保存数据代码实例
[PHP教程] 2022-02-16 16:40:57 152人阅读
在php中向mysql数据库保存数据方法最常用的两种是insert与update方法,下面我来给初学者介绍mysql数据保存方法. PHP向MySQL数据库中写入数据有三个步骤: 1,PHP和MySQL建立连接关系 2,打开MySQL数据库 3,接受页面数...[详细]
-
php中把数据库的内容导出到excel
[PHP教程] 2022-02-16 16:39:08 83人阅读
把mysql数据库中的内容导出到excel我们只要利用header输出csv格式文档就可以简单实现mysql导出excel文件了,下面我们一起来看个实例. 核心代码就是这里了,代码如下: header(Content-Type: application/vnd.ms-excel; ...[详细]
-
运用php把mysql数据库备份导出成sql示例
[PHP教程] 2022-02-16 16:38:01 177人阅读
用php代码实现数据库备份可以使网站的管理变得非常便捷,我们可以直接进后台操作就能完成数据库的备份. 关键技术: 1. 首先要得到该数据库中有哪些表,所用函数 mysql_list_tables(),然后可以将获取的所有表名存到一个...[详细]
-
apmserv中修改mysql的root与phpmyadmin密码方法
[PHP教程] 2022-02-16 16:37:34 102人阅读
apmserv是一款集成的php mysql apache的应用开发环境了,安装好之后就帮我配置好了环境并且还有phpmyadmin了,下面我来介绍在修改root密码同时把phpmyadmin密码同时改过来. 使用apmserv 5.2.6 搭建PHP环境,通过apmser....[详细]
-
php和mongoDB操作示例详解
[PHP教程] 2022-02-16 16:37:06 132人阅读
mongoDB数据库是一种以json格式存储的数据库,非常适用于各种应用开发,下面我来给各位朋友介绍一些mongoDB学习实例. mongodb想要整合PHP,需要安装Mongo扩展,这个比较简单,现在说一下MongoDB PHPAPI 及用法. 先看一个...[详细]
-
php批量删掉数据程序代码
[PHP教程] 2022-02-16 16:36:18 89人阅读
我相信很多朋友还不知道如何来批量删除不要的数据,单使用php 批量删除数据我们需要结合mysql的in条件来实现了,这个估计大家看了这句话就明白如何做了,下面我就来给需要了解的朋友详细分析批量删除数据过程. 我们删除...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]