php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
generate_mime_type_map.php File Reference

Go to the source code of this file.

Variables

 $source = count($argv) > 1 ? $argv[1] : 'https://cdn.jsdelivr.net/gh/jshttp/mime-db@v1.52.0/db.json'
 
 $data = @file_get_contents($source)
 
if($data===false) $prefs = ['nginx' => 1, 'apache' => 2, 'custom' => 3, 'iana' => 4]
 
 $extensions = []
 
 $types = json_decode($data, true)
 
 $additional_mime_maps
 

Variable Documentation

◆ $additional_mime_maps

$additional_mime_maps
Initial value:
= [
"jsm" => "application/javascript",
]

Definition at line 41 of file generate_mime_type_map.php.

◆ $data

$data = @file_get_contents($source)

Definition at line 9 of file generate_mime_type_map.php.

◆ $extensions

foreach ( $types as $mime=> $info) $extensions = []

Definition at line 18 of file generate_mime_type_map.php.

◆ $prefs

if ( $data===false) $prefs = ['nginx' => 1, 'apache' => 2, 'custom' => 3, 'iana' => 4]

Definition at line 16 of file generate_mime_type_map.php.

◆ $source

$source = count($argv) > 1 ? $argv[1] : 'https://cdn.jsdelivr.net/gh/jshttp/mime-db@v1.52.0/db.json'

Definition at line 6 of file generate_mime_type_map.php.

◆ $types

$types = json_decode($data, true)

Definition at line 19 of file generate_mime_type_map.php.