File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed
Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 33 "description" : " composer project of zhamao-framework-starter" ,
44 "minimum-stability" : " stable" ,
55 "license" : " Apache-2.0" ,
6- "version" : " 2.1 " ,
6+ "version" : " 2.2 " ,
77 "type" : " project" ,
88 "prefer-stable" : true ,
99 "scripts" : {
1616 "systemd" : " vendor/bin/start systemd"
1717 },
1818 "require" : {
19- "zhamao/framework" : " ^2.1 "
19+ "zhamao/framework" : " ^2.2 "
2020 },
2121 "require-dev" : {
2222 "swoole/ide-helper" : " @dev"
Original file line number Diff line number Diff line change 3636
3737/** 轻量字符串缓存,默认开启 */
3838$ config ['light_cache ' ] = [
39- 'size ' => 1024 , //最多允许储存的条数(需要2的倍数)
40- 'max_strlen ' => 16384 , //单行字符串最大长度(需要2的倍数)
39+ 'size ' => 512 , //最多允许储存的条数(需要2的倍数)
40+ 'max_strlen ' => 32768 , //单行字符串最大长度(需要2的倍数)
4141 'hash_conflict_proportion ' => 0.6 , //Hash冲突率(越大越好,但是需要的内存更多)
4242 'persistence_path ' => $ config ['zm_data ' ].'_cache.json ' ,
4343 'auto_save_interval ' => 900
4444];
4545
46+ /** 大容量跨进程变量存储(2.2.0可用) */
47+ $ config ["worker_cache " ] = [
48+ "worker " => 0 ,
49+ "transaction_timeout " => 30000
50+ ];
51+
4652/** MySQL数据库连接信息,host留空则启动时不创建sql连接池 */
4753$ config ['sql_config ' ] = [
4854 'sql_host ' => '' ,
7278
7379/** HTTP服务器固定请求头的返回 */
7480$ config ['http_header ' ] = [
75- 'X-Powered-By ' => 'zhamao-framework ' ,
81+ 'Server ' => 'zhamao-framework ' ,
7682 'Content-Type ' => 'text/html; charset=utf-8 '
7783];
7884
Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ public function hello() {
5555 */
5656 public function randNum () {
5757 // 获取第一个数字类型的参数
58- $ num1 = ctx ()->getArgs ( ZM_MATCH_NUMBER , "请输入第一个数字 " );
58+ $ num1 = ctx ()->getNumArg ( "请输入第一个数字 " );
5959 // 获取第二个数字类型的参数
60- $ num2 = ctx ()->getArgs ( ZM_MATCH_NUMBER , "请输入第二个数字 " );
60+ $ num2 = ctx ()->getNumArg ( "请输入第二个数字 " );
6161 $ a = min (intval ($ num1 ), intval ($ num2 ));
6262 $ b = max (intval ($ num1 ), intval ($ num2 ));
6363 // 回复用户结果
@@ -89,7 +89,7 @@ public function index() {
8989 * @return string
9090 */
9191 public function paramGet ($ param ) {
92- return "Your name: { $ param ["name " ]}" ;
92+ return "Hello, " . $ param ["name " ];
9393 }
9494
9595 /**
You can’t perform that action at this time.
0 commit comments