The following code returns on line 21 an errormessage Parse error: syntax error, unexpected T_STRING in blablablalbalblalb file
21 header("Content-Type: "mime_content_type_("".basename($str_file)));
1 <?php
2
3 function mime_content_type($filename)
4 {
5 $mime = array(
6 '.3dmf' => 'x-world/x-3dmf',
7 '.a' => 'application/octet-stream',
8 '.aab' => 'application/x-authorware-bin',
9 '.jpg' => 'image/jpg',
10 '.gif' => 'image/gif',
11 '.xwd' => 'image/x-xwd',
12 '.xyz' => 'chemical/x-pdb',
13 '.z' => 'application/x-compressed',
14 '.zip' => 'application/x-zip-compressed',
15 '.zoo' => 'application/octet-stream',
16 '.zsh' => 'text/x-script.zsh',
17 );
18 return $mime[strrchr($filename, '.')];
19 }
20
21 header("Content-Type: "mime_content_type("test.jpg"));
22
23 ?>
Now the way I see it a function is called which returns a string now why oh why can php not simply combine one string with the other? What do I need to do to get this working?
Please help me. Thank you