Login   Register  
PHP Classes
elePHPant
Icontem

File: phpinstaller/functions.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Federico  >  PHP Installer  >  phpinstaller/functions.php  >  Download  
File: phpinstaller/functions.php
Role: Auxiliary script
Content type: text/plain
Description: functions
Class: PHP Installer
Create PHP application install scripts
Author: By
Last change:
Date: 4 years ago
Size: 861 bytes
 

Contents

Class file image Download
<?php

        $GLOBALS
['HTTP_VARS'] = $_GET $_POST;
        function 
get($key=null){
            if( !
$key )
                return 
$GLOBALS['HTTP_VARS'];
            if( isset( 
$GLOBALS['HTTP_VARS'][$key] ) )
                return 
$GLOBALS['HTTP_VARS'][$key];
        }
        function 
fileExt$file$toLower true ){
            if( 
$dot_position strrpos($file,".") )
                return ( ( 
$ext substr$file$dot_position 1, ( strlen$file ) - $dot_position ) ) ) && $toLower ) ? strtolower($ext) : $ext;
        }
        function 
byte$size ) {
            
$unim = array("B","KB","MB","GB","TB","PB");
            
$i 0;
            while (
$size>=1024) {
                
$i++;
                
$size $size/1024;
            }
            return 
number_format($size,($i 0),",",".")." ".$unim[$i];
        }
        function 
myFlush(){
            
ob_end_flush();
            if( 
ob_get_flush() )
                
ob_flush();
            
flush();
            
ob_start(); 
        }

    
    
?>