php interface implements multibus
<?php
/*
* Created on 2009-10-28
* 分子如梦o(╯□╰)o
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
interface pusb{
function verson();
function type();
}
class mouse implements pusb{
function verson(){
echo "USB 2.0版本;";
}
function type(){
echo "鼠标<br>";
}
}
class video implements pusb{
function verson()
{
echo "USB 1.0版本;";
}
function type(){
echo "视频";
}
}
class myPC{
function output($that){
$that->verson();
$that->type();
}
}
$p = new myPc();
$mouse = new mouse();
$video = new video();
$p->output($mouse);
$p->output($video);
if($p instanceof myPc){
echo "<BR>YES.myPc";
}
?>
相关文档:
#apt-get install apache2
//安装apahce2
#apt-get install php5
//安装php5
#apt-get install mysql-server
//安装mysql服务端
#apt-get install mysql-myclient
//安装mysql的客户端
#apt-get install php-mysql
//安装php-mysql的连结
apache+php+mysql 环境已经搭建好了
将以下的服务重启一下
#/et ......
http://blog.csdn.net/fleaphp/archive/2009/02/26/3940430.aspx
QeePHP 的架构模式
QeePHP 是一个与众不同的框架。
QeePHP 遵循“内核最小化,功能插件化”的原则,利用内核实现了一个快速、可扩展的架构。然后在核心之外,通过各种插件提供不同类型的基础服务。
QeePHP 的架构概貌
这种架构模式的 ......
<?php
date_default_timezone_set("Etc/GMT-8");
header("content-type:text/html; charset=utf-8");
/**
* 自己定义的一个生成日历的类
* @author 张伟灿<yuanfen860913@163.com>
* @version 1.0.0
*
*/
class myCalendar
{
......
php中substr的用法详解
php.net中关于substr的说明很简单:
start
If start is non-negative, the returned string will start at the start 'th position in string , counting from zero. For instance, in the string 'abcdef', the character at position 0 is 'a', the character at position 2 is 'c', and so for ......