public function getStr($str=false){ $poems="从,善,如,登,从,恶,如,崩,已,知,花,意,未,见,其,花,,,已,见,其,花,,,未,闻,花,名,如,果,能,不,长,大,就,好,了,啊,可,是,时,光,在,身,后,挡,住,退,路,或,许,前,路,永,夜, 即,便,如,此,我,也,要,前,进,,,因,为,星,光,即,使,微,弱,也,会,为,我,照,亮,前,路,你,驻,足,于,春,色,中,,,于,那,独,一,无,二,的,春,色,之,中, 喜,欢,的,人,喜,欢,别,人,不,是,很,正,常,吗。, 生,活是,不,公,平,的,;,要,去适,应,,它,。,—,—比,尔,盖,茨,人,生,就 是,一,列,开,往坟,墓,的,列,车,,,路,途,上,会,有,,很多,站,,,很,难有,人,可,以,自,始,至,终,,陪,着走,完,。,当,陪,你,的,人,要,下,车,时,,,即,使,不,舍也,该,心,存,感,激,,,然,后挥,手 道,别。,"; $poems= explode(',',$poems); if ($str){ $str1=array_rand($poems,$str); }else{ $str1=array_rand($poems,rand(4,7)); } $str = ''; foreach ($str1 as $k=>$v){ $str .=$poems[$v]; } return $str; }