PHP Classes

File: mainFile.php

Recommend this page to a friend!
  Classes of Er. Rochak Chauhan   Automatic Archive Creator   mainFile.php   Download  
File: mainFile.php
Role: Example script
Content type: text/plain
Description: Example
Class: Automatic Archive Creator
Take backup of files by copying to other directory
Author: By
Last change:
Date: 19 years ago
Size: 1,142 bytes
 

Contents

Class file image Download
<?PHP
$startTime
= time();

if(isset(
$_SERVER['OS'])) {
    require_once(
"C:\InetPub\wwwroot\createArchive.inc.php");
}
else {
    require_once(
$_SERVER['DOCUMENT_ROOT']."createArchive.inc.php");
}



// create ojbect

$createArchive = new CreateArchive;
  
if(
$createArchive->read_dir("C:\PERSONAL\\", 5, "April", 2005)) {
   
    echo
"<HR>The archive was created successfully in :<BR> <font color ='blue' face='verdana' size='2'><B> $copyToDir</b></font>";
    echo
"<Center><HR><B>Information :-</B> <font color ='brown' face='verdana' size='2'><b>$filesCopied</b></font> files were archived after scanning <font color ='green' face='verdana' size='2'><b>$fileCounter</b></font> files in <font color ='blue' face='verdana' size='2'><b>$dirCounter</b></font> folders. <HR>";
}
else {
    echo
"<HR><center><font color ='red' face='verdana' size='2'><b> No files were found matching your criteria </b></font><BR><BR>";
}
$endTime = time();
$secondsTaken = $endTime - $startTime;

echo
"Time Taken: <font color ='blue' face='verdana' size='2' ><B>".$createArchive->convertSecToMins($secondsTaken). "</font></B><HR>";


?>