-
PHPutf-8编码问题,utf8编码,数据库乱码页面显示
[PHP教程] 2022-07-09 10:47:00 127人阅读
老声长谈,着是困惑很多人的问题,如果处理不好,都是乱码,说这些话并不是我对编码很精通,只是在这方面是得留神,自己总结了一点小经验(容易出现乱码的地方有php文件里面 ,数据库里面 存储 的编码 ,页面显示 ,...[详细]
-
简单的php数据库操作类代码增,删,改,查
[PHP教程] 2022-07-09 10:46:01 145人阅读
数据库操纵基本流程为: 1、连接数据库服务器 2、选择数据库 3、执行SQL语句 4、处理结果集 5、打印操作信息 其中用到的相关函数有 resource mysql_connect ( [string server [, string username [, string password...[详细]
-
PHP If Elseelsefi 语句
[PHP教程] 2022-07-09 10:45:24 143人阅读
条件语句 当您编写代码时,您常常需要为不同的判断执行不同的动作。 您可以在代码中使用条件语句来完成此任务。 if...else 语句 在条件成立时执行一块代码,条件不成立时执行另一块代码 elseif 语句 与 if...else 配...[详细]
-
PHP插入排序实现代码介绍
[PHP教程] 2022-07-08 12:50:44 51人阅读
算法描述: ⒈ 从第一个元素开始,该元素可以认为已经被排序;取出下一个元素,在已经排序的元素序列中从后向前扫描 2 如果该元素(已排序)大于新元素,将该元素移到下一位置 3 重复步骤3,直到找到已排序的元素小...[详细]
-
php 不能加载mcrypt.dll的解决办法
[PHP教程] 2022-07-08 12:50:04 71人阅读
php 无法加载mcrypt.dll的解决办法 1.php.ini里面查找extension=php_mcrypt.dll,去掉前面的分号; ,重启apache.无效(注意:在AppServ中php.ini在dinwos目录下) 2.自己总结的办法:试着尝试了一下,将libmcrypt.dll复制到...[详细]
-
PHP比较常用的文件操作函数经典收藏
[PHP教程] 2022-07-08 12:48:52 192人阅读
以下是个人总结的PHP文件操作函数。当然,这只是部分,还有很多,我没有列出来。 一 、解析路径: 1 获得文件名: basename(); 给出一个包含有指向一个文件的全路径的字符串,本函数返回基本的文件名。如果文件名是以...[详细]
-
精美漂亮的php分页类代码介绍
[PHP教程] 2022-07-08 12:47:44 101人阅读
这是一款简单,方便,功能齐全的分页类,可以根据自己的需要更改CSS样式文件以实现分页颜色的控制,利用php分页类,可以省去自己很多时间,只需要在分页的地方嵌入即可,下面看下使用方法: 1,在分页处进行类的实例...[详细]
-
php 怎么判断数组是几维数组
[PHP教程] 2022-07-08 12:47:07 166人阅读
?php /** * 返回数组的维度 * @param [type] $arr [description] * @return [type] [description] */ function arrayLevel($arr){ } } } aL($arr,$al); return max($al); } ?。...[详细]
-
php实现单链表的示例代码
[PHP教程] 2022-07-08 12:46:07 192人阅读
?php //链表节点 class node { public $id; //节点id public $name; //节点名称 public $next; //下一节点 public function __construct($id, $name) { $this-id = $id; $this-name = $name; $this-next = null; } }...[详细]
-
PHP中图片等比缩放的例子
[PHP教程] 2022-07-08 12:45:28 140人阅读
?php //图片的等比缩放 //因为PHP只能对资源进行操作,所以要对需要进行缩放的图片进行拷贝,创建为新的资源 $src=imagecreatefromjpeg(a.jpg); //取得源图片的宽度和高度 $size_src=getimagesize(a.jpg); $w=$size_...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]