If you see the preview of this item you can find out how it works but let's cover it in detail:
Firstly you need to include File Manager Class in your project:
include 'fileManager.php';
Secondly you need to initialize File Manager Class:
$manager = new fileManager();
Now you can determine which file extension will be shown for you ( you can set any extensions you wish ):
$manager->extension = array('txt','jpg','png', 'mp3', 'zip');
Now you can determine which file / folder will not be shown by their names:
$manager->fileDeny = array('.', '..');
Then you need to choose the returned type ( Array or JSON ):
$manager->returnType = 'array';
If you want to choose a JSON you need to define its type ( json_file or json_var ):
$manager->typeJson = "json_file";
$manager->typeJson = "json_var";
Finally you should give the file / folder path ( if it is a folder path you need to add "/" at the end of the path ) to initFileManager():
$array = $manager->initFileManager('demo/');
In order to edit your server folders there are four useful functions:
- recursiveDelete()
- copy_directory()
- rename_directory()
- move_dir()
- create_zip()
- extract_zip()
- linkPath()
<p>In order to edit your server files / folders data there are three useful functions:<br>
<ul>
<li>change_date_format()</li>
<li>change_size()</li>
<li>changeSize()</li>
</ul>
</p>
NOTE: All of the functions or variables are commented in a standard way in detail.
Please refer to the example folder within the FILEMANAGER_PHP_CLASS.zip file you have just downloaded.
We've used the following.
- DEV.php
- JSON.php