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 ......
mkdir /downloads
chown -R root:root /downloads
chmod -R 774 /downloads
一、安装Apache2
下载地址:http://www.apache.org/ --> HTTP Server --> from a mirror
1. 获取mysql源码
shell> cd /downloads
......
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 ......
以下为十个目前最流行的基于MVC设计模式的PHP框架。
1. Yii
Yii是一个基于组件的高性能的PHP的框架,用于开发大规模Web应用。Yii采用严格的OOP编写,并有着完善的库引用以及全面的教程。从MVC,DAO/ActiveRecord,widgets,caching,等级式RBAC,Web服务,到主体化,I18N和L10N,Yii提供了今日Web 2.0应用开发所需要的几 ......