123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace app\inter\controller;
- use think\Controller;
- use think\Db;
- use think\Session;
- use think\Log;
- use app\common\library\UUIDs;
- use think\Cache;
- class Index extends Controller
- {
- public function _initialize()
- {
- var_dump($_SERVER);die;
- parent::_initialize(); // TODO: Change the autogenerated stub
- $param = $_REQUEST;
- var_dump($param);
- $sessionid = $param['sessionid'];
- $doctor = Cache::get($sessionid);
- var_dump($doctor);
- $dname = DB::table('doctors')->where('id',$doctor['id'])->field('realname')->find();
- $info['id'] = UUIDs::uuid16();
- $info['param'] = serialize($param);
- $info['doctor_id'] = $doctor['id'];
- $info['doctor_name'] = $dname['realname'];
- $info['url'] = $_SERVER['REQUEST_URI'];
- var_dump($info);die;
- }
- public function index(){
- $a = "select count(1) from templates where id='00'";
- $b = DB::query($a);
- var_dump($b);
- var_dump($b[0]['count(1)']);die;
- $c = DB::table('exam_class')->where('id',2)->find();
- var_dump($c);echo '<br>';
- $b = DB::table('templates')->where('exam_class_id',$c['name'])->where('create_user',1)->select();
- var_dump($b);die;
- var_dump(Cache::get('80f3d36662cddb97'));
- // Cache::clear();die;
- $a = model('app\inter\model\Exam')->select();
- // var_dump($a);die;
- // $this->uuids = new UUIDs();
- // $id = $this->uuids->uuid16();
- // var_dump($id);die;
- return json_encode(['status'=>'ok','code'=>'0000','info'=>$a]);
- }
- }
|