Skip to content

TheAlgoslingers/Algoslingfileanew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algoslingfileanew

The package Algoslingfileanew allows you to give a unique name to your file. The mechanism is strong that no matter how many files you rename, even if they're millions they will still have their unique name preventing duplication of files. The package gives 4 options to rename file. (ie alphabets/numbers/hash/unique/alphanumeric) You can rename your file in unique way.

Contribution is allowed ❤️

How to install

-- composer require thealgoslingera/algoslingfileanew
HOW TO RENAME FILE AND/OR SAVE TO DIRECTORY
   <?php
   use Thealgoslingers\AlgoslingFileanew
   
   ## For file(s) being uploaded to server
   ## Please upload the file first
   ## Then use AlgoslingFileanew to rename it

   require "../vendor/autoload.php";
   
   $file = "path-to-your-file.extension";
   $AlgoslingFileanew = new AlgoslingFileanew;
   $newFile = $AlgoslingFileanew->renameFile($file,"Alnum");
   ## SAVE TO DIRECTORY (OPTIONAL) ##
   fopen("directory-path/$newFile","a");
   $AlgoslingFileanew = new AlgoslingFileanew();
   ?>

Tips

You may use strtolower($newFile) to rename in lowercase or strtoupper($newFile) to rename in uppercase

About

Rename file in unique and pretty way

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages