1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Support\Facades\DB;
- //$mysql_conf = array(
- // 'host' => '192.168.44.128',
- // 'port' => '3306',
- // 'db' => 'repair_lite',
- // 'db_user' => 'root',
- // 'db_pwd' => '123456',
- //);
- //$mysql_conn = @mysqli_connect($mysql_conf['host'], $mysql_conf['db_user'], $mysql_conf['db_pwd'], $mysql_conf['db'], $mysql_conf['port']);
- ////$mysql_conn = new mysqli($mysql_conf['host'], $mysql_conf['db_user'], $mysql_conf['db_pwd'], $mysql_conf['db'], $mysql_conf['port']);
- //if (!$mysql_conn) {
- // die("could not connect to the database:\n" . $mysql_conn->error);//诊断连接错误
- //}
- //
- //$status = $mysql_conn->get_connection_stats();
- ////print (json_encode($status));
- //
- //$result = $mysql_conn->query('select * from permission;');
- //print ($result->num_rows);
- //$mysql_conn::select("select * from vipinfo");
- //var_dump($student);
- ////以节点树的形式输出结果
- //dd($student);
- class H_User extends Model
- {
- protected $table = 'Models';
- }
- //
- //$students=User::all();
- //dd($students);
- //DB::select('select * from user');
|