博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年3月15日

摘要: <?phpif(!defined("STDIN")) {define("STDIN", fopen('php://stdin','r'));}//php5.2里面STDIN已经定义了echo "Hello! What is your name (enter below):\n";$strName = fread(STDIN, 80);echo 'Hello ',$strName, "\n"; 阅读全文

posted @ 2012-03-15 18:00 bug yang 阅读(355) 评论(0) 推荐(0) 编辑

摘要: PHP魔术函数class Person{ private $name; private $age; private $sex; public function __construct($name,$age,$sex){ $this->name=$name; $this->age=$age; $this->sex=$sex; } public function __get($property){ if(isset($this->$property)){ return $this->$... 阅读全文

posted @ 2012-03-15 16:31 bug yang 阅读(360) 评论(0) 推荐(0) 编辑