上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 29 下一页
摘要: IsSMTP() ;下一行加上 $mail->Port = 端口号;*/require 'class.phpmailer.php';$mail = new PHPMailer;$mail->IsSMTP(); // Set mailer to use SMTP$mail->Host = 'smt... 阅读全文
posted @ 2014-03-16 21:33 好记性还真不如烂笔头 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 如下的数据表create table `test`( `id` int(11) not null auto_increment primary key, `user` varchar(100) not null, `flag` char(2) not null default 'ok');当查... 阅读全文
posted @ 2014-03-16 11:48 好记性还真不如烂笔头 阅读(625) 评论(0) 推荐(0) 编辑
摘要: 标记之前,不会显示出整个表格。一些版本的 Microsoft Internet Explorer 只有当接受到的256个字节以后才开始显示该页面,所以必须发送一些额外的空格来让这些浏览器显示页面内容。 */void ob_implicit_flush([int $flag = true])/* 打... 阅读全文
posted @ 2014-03-16 10:36 好记性还真不如烂笔头 阅读(407) 评论(0) 推荐(0) 编辑
摘要: $str = "lin == 3615";$pattern = "/(.*)/";$str = preg_replace($pattern, "$1", $str);print_r($str);$pattern 中没有问号结果为:lin == 3615$str = "lin == 3615";$pattern = "/(.*?)/";$str = preg_replace($pattern, "$1", $str);print_r($str);$pattern 中有问号(相当 阅读全文
posted @ 2014-03-15 21:59 好记性还真不如烂笔头 阅读(460) 评论(0) 推荐(0) 编辑
摘要: $v) { $a[$k] = t($v); } }else{ $a = $a*10; } return $a;}$ab = t($arr);// 此时数组的每个元素都乘了 10 了print_r($ab);// 结果为Array( [0] => Array ( ... 阅读全文
posted @ 2014-03-15 00:49 好记性还真不如烂笔头 阅读(990) 评论(0) 推荐(0) 编辑
摘要: name = $name; } public function Show() { echo "装扮" . $this->name; }}//服饰类class Finery extends Person{ protected component; public function Decoration(Person $component) { $this->component = $component; } public function Show() { if($this->component != null) { $this->component-& 阅读全文
posted @ 2014-03-14 21:35 好记性还真不如烂笔头 阅读(142) 评论(0) 推荐(0) 编辑
摘要: strategy = $strategy; } public function ContextInterface() { $this->strategy->AlgorithmInterface(); }}// 实现过程$context = new Context(new ConcreteStrategyA());$context.ContextInterface();$context = new Context(new ConcreteStrategyB());$context.ContextInterface();$context = new Context(new Concre 阅读全文
posted @ 2014-03-14 21:33 好记性还真不如烂笔头 阅读(321) 评论(0) 推荐(0) 编辑
摘要: numA = $numA; $this->numB = $numB; } abstract function getResult();}class OperationAdd extends Operation{ public function getResult() ... 阅读全文
posted @ 2014-03-14 21:32 好记性还真不如烂笔头 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 单例类:1、构造函数需要标记为private(访问控制:防止外部代码使用new操作符创建对象),单例类不能在其他类中实例化,只能被其自身实例化;2、拥有一个保存类的实例的静态成员变量3、拥有一个访问这个实例的公共的静态方法(常用getInstance()方法进行实例化单例类,通过instanceo... 阅读全文
posted @ 2014-03-14 21:29 好记性还真不如烂笔头 阅读(150) 评论(0) 推荐(0) 编辑
摘要: // bool is_dir(string $filename) 判断给定文件名是否是一个目录。// resource opendir(string $path[,resource $context]) // 打开一个目录句柄,可用于之后的 closedir(),readdir() 和 rewind... 阅读全文
posted @ 2014-03-14 11:08 好记性还真不如烂笔头 阅读(257) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 29 下一页