-
php程序里调用mysql存储过程实例
[PHP教程] 2022-02-16 16:50:33 80人阅读
php与mysql本来就是天生的一对了,下面我来介绍在php程序中怎么调用在mysql中己经写好的存储过程,大家一起来看看具体实现方法. Mysql存储过程创建语法,代码如下: CREATE PROCEDURE和CREATE FUNCTION CREATE PROCEDURE...[详细]
-
PHP运用XML备份MySQL数据库实例
[PHP教程] 2022-02-16 16:49:55 146人阅读
本文章来给大家介绍一个PHP利用XML备份MySQL数据库实例,这种方法个人认为只适用小数据量,并且安全性要求不高的用户了. 以下是在Linux下通过Apache+PHP对Mysql数据库的备份的文件代码. 文件一、Listtable.php,文件列...[详细]
-
php mysqli批量替换数据库表前缀示例
[PHP教程] 2022-02-16 16:49:15 137人阅读
在php中有时我们要替换数据库中表前缀但是又不苦于一个个表去修改前缀吧,下面我自己写了一个mysqli批量替换数据库表前缀的php程序,希望些方法对你有帮助,代码如下: ?php header ( http-equiv=Content-Type content=t...[详细]
-
php连接不上MySQL问题处理办法
[PHP教程] 2022-02-16 16:48:20 64人阅读
php连接不上mysql的原因有很多种常用的可能是函数没开启或mysql数据库配置有问题,下面我来给大家介绍php连接不上MySQL一些问题的分析与解决方法. 现象1 在PHP error log里发现:PHP Warning: mysqli::mysqli(): (HY00...[详细]
-
php生成excel列名,超过26列大于Z问题解决方法
[PHP教程] 2022-02-16 16:48:01 161人阅读
我们生成excel都会使用phpExcel类了,下面我来给大家介绍在生成excel列名超过26列大于Z问题解决办法吧,这是phpExcel类中的方法,今天查到了,记录一下备忘,代码如下: public static function stringFromColumnIndex($pC...[详细]
-
一个轻松php数据库备份程序
[PHP教程] 2022-02-16 16:47:08 128人阅读
php备份mysql数据库是很多个人站长网站所具备的功能,当然如果你要备份几个GB或更大的数据库时php备份方法感觉有点吃力了. PHP 备份 mysql 数据库的源代码,在完善的 PHP+Mysql 项目中,在后台都会有备份 Mysql 数据库...[详细]
-
php随机取mysql记录办法示例
[PHP教程] 2022-02-16 16:46:41 181人阅读
在php中要随机取mysql记录我们可以直接使用mysql_query来执行mysql中的select rand函数获取的数据并读出来,下面我来给大家介绍一下具体实例. 方法一,代码如下: select * from tablename order by rand() limit 1 把 ...[详细]
-
PHP Mysql数据库备份类程序汇总
[PHP教程] 2022-02-16 16:46:07 194人阅读
数据库备份类我们只要在网上一搜索在N多的类代码,下面我来总结几款不错数据库备份希望对大家有所帮助. 数据库备份类,使用方法,代码如下: require_once(backdata.class.php); $link = @mysql_connect(localhost,数据...[详细]
-
php PDO 使用办法详解
[PHP教程] 2022-02-16 16:45:13 197人阅读
PDO::exec:返回的是int类型,表示影响结果的条数. PDOStatement::execute 返回的是boolean型,true表示执行成功,false表示执行失败,这两个通常出现在如下代码: $rs0 = $pdo-exec($sql); $pre = $pdo-prepare($sql); $r...[详细]
-
php查询mssql出现问号 中文乱码 解决办法
[PHP教程] 2022-02-16 16:43:23 57人阅读
在php连接mssql时查询出来的全部是问题了,这种问题我根据经验知道是编码问题,下面来给各位总结一下解决方法. 方法一,修改php.ini文件,当然根据你页面情况来设置也可以是utf-8编码了,代码如下: ;mssql.charset = ISO-...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]