30 行
642 B
PHP
可执行文件
30 行
642 B
PHP
可执行文件
<?php
|
|
//[1.3.22]
|
|
/**
|
|
* Websocket参数配置模型数据
|
|
*/
|
|
namespace Common\Model;
|
|
use Think\Model;
|
|
|
|
class WebsocketModel extends Model
|
|
{
|
|
protected $tableName = 'Websocket';
|
|
protected $fields = array(
|
|
0=>"id",
|
|
1=>"ip",
|
|
2=>"client",
|
|
3=>"status",
|
|
4=>"intranet_client",
|
|
5=>"start_port",
|
|
6=>"original_ip",
|
|
);
|
|
//修改参数
|
|
public function SaveWebsocket($data){
|
|
$re = $this->where("id = 1")->save($data);
|
|
return $re;
|
|
}
|
|
public function getWebsocket(){
|
|
$cahce = $this->find();
|
|
return $cahce;
|
|
}
|
|
} |