PHP code example of infrajs / load

1. Go to this page and download the library: Download infrajs/load library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

infrajs / load example snippets


use infrajs\load\Load;
$data = Load::loadJSON('path/to/json.php');


$fdata = Load::nameInfo($filename); //Возвращает подробный массив описывающий имя файла
$fdata = Load::srcInfo($filename); //Возвращает подробный массив описывающий путь до файла
//$fdata содержит name, num, date, ext - всегда в нижнем регистре, file
Load::sort($list, $order); //Сортирует массив с $fdata по цифре в начале имени файла и по текусту
//Параметр order может быть 'ascending' или 'descending' распространяется только на порядок названий с цифрами в начале. Буквы сортируются в порядке алфавита в обоих случаях