PHP Classes

File: test/testing.php

Recommend this page to a friend!
  Classes of The Algoslingers   Algosling PHP Rename a File   test/testing.php   Download  
File: test/testing.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Algosling PHP Rename a File
Change a file name to have the given requirements
Author: By
Last change:
Date: 6 months ago
Size: 673 bytes
 

Contents

Class file image Download
<?php
use Thealgoslingers\AlgoslingFileanew;
/*
## For file(s) being uploaded to server
## Please upload the file first
## Then use AlgoslingFileanew to rename it

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

$AlgoslingFileanew = new AlgoslingFileanew();
$newFile = strtolower($AlgoslingFileanew->renameFile("textfile.txt","Alnum"));
echo
"Your new file is: $newFile";
?>