摘要:
num=$num;$this->price=$price;}publicfunctioncost(){if($this->price==self::Ted)return30;elseif($this->price==self::Sed)return5*$this->num;else{$this->price==self::Ted;return35;}}publicfunctionccc(){if($this->price==self::Ted)return'a';elseif($this->price==self::Sed)return 阅读全文
摘要:
<?php//获取tech和98426这两个字符串$str="http://info.meadin.com/tech/98426_1.shtml";echo$newstr=substr($str,7,strlen($str)); //info.meadin.com/tech/98426_1.shtml$arr=explode('/',$newstr);$num = $arr[1];//tech$user=strstr($arr[2],'_',true);//98426 阅读全文