PHP code example of crispy-computing-machine / hashfilestorage
1. Go to this page and download the library: Download crispy-computing-machine/hashfilestorage 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/ */
crispy-computing-machine / hashfilestorage example snippets
// Test storage of multi files in multi folders
$oStorage = new HashFileStorage();
for($i = 0; $i <= 1000; $i++){
$sTestFilename = uniqid("store_");
$sTestFileText = "This file contains text for file: " . $sTestFilename;
$bSave = $oStorage->file_put_contents($sTestFilename, $sTestFileText);
error_log("Saving HashFileStorage file: " . $sTestFilename . " (" . var_export($bSave, TRUE) . ")");
}