Subdomain Posts
PHP | 31 days ago
PHP | 54 days ago
PHP | 54 days ago
Bash | 172 days ago
None | 468 days ago
None | 505 days ago
None | 528 days ago
None | 530 days ago
None | 550 days ago
Recent Posts
None | 12 sec ago
None | 15 sec ago
None | 35 sec ago
None | 52 sec ago
None | 59 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
C++ | 2 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Lazza on the 26th of Jan 2010 06:59:16 PM Download | Raw | Embed | Report
  1.         function zula_get_file_mime( $file ) {
  2.                 $libLog = Registry::get( 'log' );
  3.                
  4.                 //$libLog->message( 'Ho ricevuto questo -> '.$file, Log::L_WARNING );
  5.                 $exten = strtolower( pathinfo( $file, PATHINFO_EXTENSION ) );
  6.                 //$libLog->message( 'Estensione -> '.$exten, Log::L_WARNING );
  7.                
  8.                 switch($exten) {
  9.                         case 'gif': $mime = 'image/gif';
  10.                                                 break;
  11.                         case 'jpg':
  12.                         case 'jpeg':$mime = 'image/jpeg';
  13.                                                 break;
  14.                         case 'png': $mime = 'image/png';
  15.                                                 break;
  16.                         case 'flv': $mime = 'video/x-flv';
  17.                                                 break;
  18.                         case 'mp4': $mime = 'video/mp4';
  19.                                                 break;
  20.                         case 'mp3': $mime = 'audio/mpeg';
  21.                                                 break;
  22.                         default: $mime = false;
  23.                 }
  24.                
  25.                 return $mime;
  26.         }
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: