class.handler_view.php

来自「Professional PHP5 code for this book」· PHP 代码 · 共 24 行

PHP
24
字号
<?phprequire_once('class.Event_Handler.php');class handler_View extends Event_Handler {   private $handle;   function __construct($event_handle){      $this->handle = $event_handle;   }            function handled_event(){      echo "The event, $this->handle, is now handled. <BR>       It is, I promise!<BR><BR>Your records are as follows: <BR> <BR>";          $id = parent::dbconn();      $result = pg_query($id, "SELECT * FROM user");      while($query_data = pg_fetch_row($result)) {         echo "'",$query_data[1],"' is a ",$query_data[4],"<br>";      }   }}?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?