Location: PHPKode > scripts > UploadFile > baseClass/uploadEngineClass.php
<?php
class uploadFile {
	
	/*#
	#
	# Mother Class
	#
	# Version: 0.5
	#
	#
	*/#

    var $fileName;
    var $fileTmpName;
    var $fileSize;
    var $fileType;
    var $fileErro;
    var $fileDestinationTmp;
    var $fileDestination;
    
    function uploadFile ($name,$tmpName,$size,$type,$erro="0") {
        $this->fileName=$name;
        $this->fileTmpName=$tmpName;
        $this->fileSize=round($size/1024);
        $this->fileType=$type;
        $this->fileErro=$erro;
    }
    
    function setDestinationFile ($TmpDir,$Dir) {
        $this->fileDestinationTmp=$TmpDir;
       $this->fileDestination=$Dir;
	}
    
    function moveFile () {
        if(move_uploaded_file($this->fileTmpName,$this->fileDestinationTmp.$this->fileName)) {
            return true;
        }else{
            return false;
        }
    }
	
	function copyFile($dirTmpFile,$dirFile) {
		if(copy($dirTmpFile.$this->fileName,$dirFile.$this->fileName)) {
			return true;	
		}else{
			return false;
		}
	}
	
	function fileUnlink ($file) {
		if(unlink($file)) {
			return true;
		}else{
			return false;
		}
	}
}
?>
Return current item: UploadFile