-
LotusPhp笔记之Logger组件的使用方法
[PHP教程] 2022-07-12 11:26:09 178人阅读
今天比较忙,本来想写多点内容,暂时没有办法了,捡个比较简单的组件来写下好了,往后的几章都是介绍组件。 LtLogger的使用还是比较简单的,基本代码都是在Autoloader的环境下运行的,所以我也懒的去引用神马路径,...[详细]
-
PHP命名空间Namespace的使用详解
[PHP教程] 2022-07-12 11:24:58 139人阅读
对于命名空间,官方文档已经说得很详细[],我在这里做了一下实践和总结。 命名空间一个最明确的目的就是解决重名问题,PHP中不允许两个函数或者类出现相同的名字,否则会产生一个致命的错误。这种情况下只要避免命名...[详细]
-
php中判断数组是一维,二维,还是多维的解决方法
[PHP教程] 2022-07-12 11:24:18 67人阅读
复制代码 代码如下:www.CuoXIn.com ?php /** * 返回数组的维度 * @param [type] $arr [description] * @return [type] [description] */ function arrayLevel($arr){ $al = array(0); function aL($arr,$al,$level=0...[详细]
-
基于PHP 面向对象之成员方法详解
[PHP教程] 2022-07-12 11:23:55 155人阅读
用一个列子来读解成员方法:大家可以自己动手写一写,加深理解。 这样一个需求; 希望人可以说话, 做算术题.......,这样就需要使用到成员方法: 1、添加speak 成员方法,输出 我是小明 2、添加jisuan 成员方法,可以计算...[详细]
-
用php实现选择排序的解决方法
[PHP教程] 2022-07-12 11:23:32 80人阅读
用php实现选择排序的解决方法 1,定义:选择排序(Selection sort)是一种简单直观的排序算法。它的工作原理如下。首先在未排序序列中找到最小(大)元素,存放到排序序列的起始位置,然后,再从剩余未排序元素中继续...[详细]
-
PHPMailer邮件发送的实现代码
[PHP教程] 2022-07-12 11:23:08 132人阅读
本机环境:LAMP(ubuntu12.10); SMTP服务器用的是stmp.163.com。刚开始对于这个还是蛋疼的,最先使用的是stmp.qq.com结果发的邮件都被腾讯当成垃圾邮件处理了发不出去, 怎么该内容都没过。然后我改成了stmp.gmail....[详细]
-
用php制作简单分页从数据库读取记录的方法详解
[PHP教程] 2022-07-12 11:22:20 70人阅读
PHP新手,一直想做一下分页都给忘了,今天有幸被提醒所以网上搜了一下。有些写的看不懂也没怎么去看。最后找到一个比较简单的。 大致的思想就是: 1.设置每页要显示的最大记录数。 2.计算出页面总数 3.当前页面跟总...[详细]
-
基于php验证码函数的使用示例
[PHP教程] 2022-07-12 11:21:57 145人阅读
复制代码 代码如下:www.CuoXIn.com function _code($_code_length = 4, $_width = 75, $_height = 25){ for($i=0;$i$_code_length;$i++){ $_nmsg .= dechex(mt_rand(0,15)); } $_SESSION[code] = $_nmsg; $_img = im...[详细]
-
PHP更新购物车数量表单部分PHP处理部分
[PHP教程] 2022-07-12 11:21:32 185人阅读
表单部分: 复制代码 代码如下:www.CuoXIn.com form action=?action=edit_num method=post name=car?php $c_rs[id];? id=car?php $c_rs[id];? input name=suliang[?php echo $c_rs[sp_id];?] type=text id=suliang[?...[详细]
-
如何成为PHP高手
[PHP教程] 2022-07-12 11:21:10 56人阅读
PHP是一门高效的网络编程语言,由于它具有编写灵活、运行快速等优点,迅速成为Web程序员的首选语言。那么怎样才能成为一个优秀的PHP开发者呢? 要成为一名PHP编程高手并不容易,并不像很多人想象的那样,只要能够飞快...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]