You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

49 lines
1008 B

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class CommonTest extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'common:test';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
setlocale(LC_ALL,array('zh_CN.gbk','zh_CN.gb2312','zh_CN.gb18030'));
setlocale(LC_ALL, "zh_CN.UTF-8");
$p1 = pathinfo('D:\\atlas\\这是文件夹\\可爱胖胖是怎么变帅的#超能陆战队.mp4');
$p2 = pathinfo('D:\\atlas\\dirname\\sssss#ddddd.mp4');
print_r($p1);
print_r($p2);
//
}
}