add getMysqlColumnInfo()

This commit is contained in:
xiaomlove
2021-06-06 13:41:05 +08:00
parent 38869ea196
commit eca64ec4c0
5 changed files with 42 additions and 16 deletions

View File

@@ -11,7 +11,6 @@ use App\Repositories\ExamRepository;
use App\Repositories\SearchBoxRepository;
use App\Repositories\TorrentRepository;
use Carbon\Carbon;
use Doctrine\DBAL\Schema\Schema;
use Illuminate\Console\Command;
use Illuminate\Encryption\Encrypter;
use Illuminate\Support\Facades\DB;
@@ -51,14 +50,7 @@ class Test extends Command
*/
public function handle()
{
// $r = \Illuminate\Support\Facades\Schema::getColumnListing('torrents');
// $r = urldecode('%b5%8f%7c%a9%85%ed%e2%bb%09%fd1%ab%8d%11%e5%11%bb%18%deD');
// $r = bin2hex($r);
$str = 'passkey=bef88d0cbe4ccbc1569b8404d09c4c5a&info_hash=%cd%8d%5b%09%08%d7%1d%01_o8%c0%e1Wd%ff%95%84J%e1&peer_id=-TR3000-zxcl8rs3my5o&port=51416&uploaded=0&downloaded=0&left=0&numwant=80&key=2d2ebd37&compact=1&supportcrypto=1&ipv6=240e%3A3b1%3A6400%3Ac20%3A211%3A32ff%3Afebb%3A9fb1';
$firstNeedle = "info_hash=";
$start = strpos($str, $firstNeedle) + strlen($firstNeedle);
$end = strpos($str, "&", $start);
$r = substr($str, $start, $end - $start);
$r = \Nexus\Database\DB::getConnection();
dd($r);
}