File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22$ cache ['session ' ] = array (
3- 'type ' => 'FileCache ' ,
3+ 'type ' => 'FileCache ' ,
44);
55$ cache ['master ' ] = array (
66 'type ' => 'Memcache ' ,
Original file line number Diff line number Diff line change @@ -42,6 +42,18 @@ function tpl_test()
4242 $ this ->tpl ->display ('tpl_test.html ' );
4343 }
4444
45+ function session_test ()
46+ {
47+ $ this ->session ->start ();
48+ $ _SESSION ['hello ' ] = 'swoole ' ;
49+ }
50+
51+ function session_read ()
52+ {
53+ $ this ->session ->start ();
54+ var_dump ($ _SESSION );
55+ }
56+
4557 //使用php直接作为模板
4658 function view_test ()
4759 {
Original file line number Diff line number Diff line change @@ -121,7 +121,6 @@ function rollback()
121121 /**
122122 * 执行一条SQL语句
123123 * @param $sql
124- * @return unknown_type
125124 */
126125 public function query ($ sql )
127126 {
Original file line number Diff line number Diff line change @@ -546,12 +546,12 @@ public function count()
546546 {
547547 $ cc +=$ _c ['c ' ];
548548 }
549- return $ cc ;
549+ return intval ( $ cc) ;
550550 }
551551 else
552552 {
553553 $ c = $ this ->db ->query ($ sql )->fetch ();
554- return $ c ['c ' ];
554+ return intval ( $ c ['c ' ]) ;
555555 }
556556 }
557557 /**
You can’t perform that action at this time.
0 commit comments