up.
This commit is contained in:
parent
2ed72e3980
commit
4d60f26e35
@ -8,6 +8,7 @@ class Index extends BaseController
|
|||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
|
||||||
// $user = SysUser::with(['roles.menus'=> function($query) {
|
// $user = SysUser::with(['roles.menus'=> function($query) {
|
||||||
// $query->where('deleted', 0);
|
// $query->where('deleted', 0);
|
||||||
// }])->find("1");
|
// }])->find("1");
|
||||||
@ -17,6 +18,7 @@ class Index extends BaseController
|
|||||||
// dump($menus);
|
// dump($menus);
|
||||||
|
|
||||||
// dd($user->getMenus(true));
|
// dd($user->getMenus(true));
|
||||||
|
tcpSend();
|
||||||
|
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
@ -27,4 +29,16 @@ class Index extends BaseController
|
|||||||
{
|
{
|
||||||
return 'hello,' . $name;
|
return 'hello,' . $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function tcpSend()
|
||||||
|
{
|
||||||
|
$socket = fsockopen('tcp://139.155.158.111', 5174, $errno, $errstr, 10);
|
||||||
|
if ($socket) {
|
||||||
|
fwrite($socket, '$db_init | root:Pt8NmHSY4etyEn@tcp(192.168.1.3:3306)/am_biqu?charset=utf8mb4');
|
||||||
|
while (!feof($socket)) {
|
||||||
|
echo fgets($socket, 128); // 逐行读取响应
|
||||||
|
}
|
||||||
|
fclose($socket);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user