dever 3 years ago
parent
commit
fc75dd850b
2 changed files with 3 additions and 1 deletions
  1. 1 1
      database/cron.php
  2. 2 0
      src/Database.php

+ 1 - 1
database/cron.php

@@ -46,7 +46,7 @@ return array
 	'desc' => Dever::markdown('**启动cron的方法,以下三项任选其一:**
 	1. 常规任务:请将 ```* * * * * root php '.$path.'daemon/main.php``` 放到cron中[建议每分钟执行一次] 
 	2. 用户触发:请在 ```config/base.php里开启cron=true``` [一般适用于虚拟主机]
-	3. 长期运行:请执行 ```setsid php '.$path.'daemon/loop.php > /dev/null &``` 指令,放置后台运行[一般用于队列等需要长期运行的项目]'),
+	3. 长期运行:请执行 ```php '.$path.'daemon/loop.php 1>/dev/null 2>&1 &``` 指令,放置后台运行[一般用于队列等需要长期运行的项目]'),
 	# 数据结构
 	'struct' => array
 	(

+ 2 - 0
src/Database.php

@@ -2355,6 +2355,8 @@ class Database
                         $result .= '<a href="javascript:;" onclick="fastEdit($(this), \'' . $url . '\', \''.$vj[0].'\', \''.$vj[1].'\')"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 '.$class.'">' . $vj[0] . '</button></a>&nbsp;&nbsp;';
                     } elseif (strpos($kj, 'oper') !== false) {
                         $result .= '<a href="javascript:;" onclick="load(\'' . Dever::url($pj) . '\')"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 '.$class.'">' . $vj[0] . '</button></a>&nbsp;&nbsp;';
+                    } elseif (strpos($kj, 'new') !== false) {
+                        $result .= '<a href="' . $this->url($kj, $data['id'], $pj) . '" target="_blank" class="oper_' . $kj . '"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 '.$class.'">' . $h . $vjn . '</button></a>&nbsp;&nbsp;';
                     } elseif (isset($vj[1]) && strpos($vj[1], 'modal|') !== false) {
                         $t = explode('|', $vj[1]);
                         $result .= '<a href="#dever_modal" data-toggle="modal"  class="btn btn-info btn-rounded waves-effect waves-light m-b-5 '.$class.'" onclick=' . $t[1] . ' msg-send="' . $this->value($t[2], $data) . '">' . $vj[0] . '</a>&nbsp;&nbsp;';