更新代码,适配php7.4
This commit is contained in:
parent
4c3e17d851
commit
b3f52b21d1
@ -6,13 +6,6 @@ use think\facade\Session;
|
|||||||
|
|
||||||
class Index
|
class Index
|
||||||
{
|
{
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
$url = "http://www.5cctv.net/wp-content/plugins/erphpdown/payment/vmq/notify.php?payId=190717101020112222981¶m=order[7876632]&type=1&price=1&reallyPrice=1&sign=2398a2492db0616381a85c1fedc51a11";
|
|
||||||
return $this->getCurl($url);
|
|
||||||
|
|
||||||
//return 'by:vone';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getReturn($code = 1, $msg = "成功", $data = null)
|
public function getReturn($code = 1, $msg = "成功", $data = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -395,7 +395,7 @@ class Response
|
|||||||
if (null == $this->content) {
|
if (null == $this->content) {
|
||||||
$content = $this->output($this->data);
|
$content = $this->output($this->data);
|
||||||
|
|
||||||
if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable([
|
if (null !== $content && !is_string($content) && !is_numeric($content) && !is_bool($content) && !is_array($content) && !is_callable([
|
||||||
$content,
|
$content,
|
||||||
'__toString',
|
'__toString',
|
||||||
])
|
])
|
||||||
@ -403,7 +403,13 @@ class Response
|
|||||||
throw new \InvalidArgumentException(sprintf('variable type error: %s', gettype($content)));
|
throw new \InvalidArgumentException(sprintf('variable type error: %s', gettype($content)));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->content = (string) $content;
|
if (is_bool($content)) {
|
||||||
|
$this->content = $content ? 'true' : 'false';
|
||||||
|
} elseif (is_array($content)) {
|
||||||
|
$this->content = json_encode($content);
|
||||||
|
} else {
|
||||||
|
$this->content = (string) $content;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->content;
|
return $this->content;
|
||||||
|
|||||||
@ -1815,9 +1815,8 @@ abstract class Connection
|
|||||||
*/
|
*/
|
||||||
public function getExecuteTimes()
|
public function getExecuteTimes()
|
||||||
{
|
{
|
||||||
return Db::$executeTimes;
|
return json(['times' => Db::$executeTimes]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关闭数据库(或者重新连接)
|
* 关闭数据库(或者重新连接)
|
||||||
* @access public
|
* @access public
|
||||||
|
|||||||
@ -565,7 +565,7 @@ class Query
|
|||||||
$seq = (ord(substr($type($value), 0, 1)) % $rule['num']) + 1;
|
$seq = (ord(substr($type($value), 0, 1)) % $rule['num']) + 1;
|
||||||
} else {
|
} else {
|
||||||
// 按照字段的首字母的值分表
|
// 按照字段的首字母的值分表
|
||||||
$seq = (ord($value{0}) % $rule['num']) + 1;
|
$seq = (ord($value[0]) % $rule['num']) + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $this->getTable() . '_' . $seq;
|
return $this->getTable() . '_' . $seq;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user