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";
}
?>
相关文档:
Blog系统作为大家最常接触的互联网东东,在站长群体中几乎人手一博,从知名门户的博客频道,到网络营销专家博客,网民对博客的关注度在不断提高并深化。目前网上免费的blog系统太杂,在此整理PHP版的Blog介绍如下:
1、wordpress:http://www.wordpress.org 功能也很全面,应该是支持blog的首选。它有最强的模版功能,已经 ......
#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 ......
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 ......
在网站设计中我们经常会遇到需要多语言支持的情况。多语言系统按照支持的方式一般可分为两种:
1.支持多语言,但不支持多种语言的同时存在,也就是说要么是中文要么是英文或者其他,这在一些需要国际化支持的网页系统中经常用来,以便方便用户本地化。 2.支持多语言并可同时浏览不同语言版本的网页。今天我想讨 ......