在线等给分~PHP克癃问题!
PHP code:
<?php
class Corporate_Drone {
private $employeeid;
private $tiecolor;
function setEmployeeID($employeeid) {
$this->employeeid = $employeeid;
}
function getEmployeeID() {
return $this->employeeid;
}
function setTieColor($tiecolor) {
$this->tiecolor = $tiecolor;
}
function getTieColor() {
return $this->tiecolor;
}
function __clone(){
$this->tiecolor = "432423";
}
}
$drone1 = new Corporate_Drone();
$drone1->setEmployeeID("12345");
$drone1->setTieColor("3213123");
//克隆对象
$drone2 = clone $drone1;
$drone2->setEmployeeID("789");
printf("drone1 empoyeeID:%d<br/>", $drone1->getEmployeeID());
printf("drone1 tiecolor:%d<br/>", $drone1->getTieColor());
printf("drone2 empoyeeID:%d<br/>", $drone2->getEmployeeID());
printf("drone2 tiecolor:%d<br/>", $drone2->getTieColor());
?>
结果是这样:
drone1 empoyeeID:12345
drone1 tiecolor:3213123
drone2 empoyeeID:789
drone2 tiecolor:432423
$drone1->setEmployeeID("12345");为什么设置成字母就无法显示???
为什么drone1 tiecolor:3213123还会显示????
{{
相关问答:
各位大侠
求一段php代码
可以实现以下功能
针对不同的浏览器显示不同的图片
就是有一张图片,只想给ie6用户看到
如果ie7、chrome、firefox用户浏览则显示另外一张图片  ......
1.精通面向对象的设计和开发;
2.熟练使用PHP语言(5.0+)进行数据库,网络通信,文件读写,安全机制等开发;
3.熟练使用MYSQL(5.0+)数据库开发,包括基本的数据库设计/优化/安全,复杂的T-SQL语句编写,熟练编写MYS ......
请问
object(Helper_Uploader_File) {
protected '_file' => array(
'name' => string '4_光影_1.jpg' (length=14)
'type ......
得到客户端IP老问题了,但这次环境有点不一样( 客户是这样的环境没办法,说BT的请飘过 :) )。
win2k3该系统(下称系统A)上装了VMware Server,VM下有个win2k3系统(下称系统B)。
系统A:直接连接公网。有公网I ......