class 留言本{
  function 浏览{}
  function 发表{}
  function 回复{}
}

解决方案 »

  1.   

    class Message{
    private $content;//constructor
    public Message($get_from){
    }public leave_message(){
    $this->get_content();
    $this->write_in_db();
    }private function get_content(){
    // do Sth.
    };
    private function write_in_db(){
    //write the data into database
    }//end
    }
      

  2.   

    public Message($get_from){
    }请问这里怎么写,请介绍一下,下面的我基本上会写,在这里非常感谢大家的帮助。
      

  3.   

    this is the constructor of class Message, you can choose to do some jobs.just likepublic Message($get_from){
      $this->content=$get_from;
    }