Index.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace app\index\controller;
  3. use think\Controller;
  4. use think\worker\Server as WorkerServer;
  5. class Index extends Controller
  6. {
  7. public function index()
  8. {
  9. return '<style type="text/css">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }</style><div style="padding: 24px 48px;"> <h1>:) </h1><p> ThinkPHP V5.1<br/><span style="font-size:30px">12载初心不改(2006-2018) - 你值得信赖的PHP框架</span></p></div><script type="text/javascript" src="https://tajs.qq.com/stats?sId=64890268" charset="UTF-8"></script><script type="text/javascript" src="https://e.topthink.com/Public/static/client.js"></script><think id="eab4b9f840753f8e7"></think>';
  10. }
  11. /**
  12. * 数据统计页面
  13. *
  14. * @return void
  15. * @author wj
  16. * @date 2022-10-13
  17. */
  18. public function datastatistics()
  19. {
  20. return $this->fetch();
  21. }
  22. /**
  23. * 日间照料中心统计数据
  24. *
  25. * @return void
  26. * @author wj
  27. * @date 2023-01-31
  28. */
  29. public function mealcenterlist()
  30. {
  31. return $this->fetch();
  32. }
  33. public function test1()
  34. {
  35. $class = "app\workerman\ShTcp";
  36. if (class_exists($class)) {
  37. $worker = new $class;
  38. if (!$worker instanceof WorkerServer) {
  39. var_dump('123');
  40. }
  41. } else {
  42. var_dump("qwe");
  43. }
  44. }
  45. }