Changeset 3248 for libcaca/trunk/caca-php/examples/www
- Timestamp:
- Nov 3, 2008, 10:17:34 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca-php/examples/www/export.php
r3247 r3248 150 150 ); 151 151 152 $ extension_map = array(152 $download_extension_map = array( 153 153 'ansi' => 'txt', 154 154 'utf8' => 'txt', … … 156 156 'irc' => 'txt', 157 157 'tga' => 'tga' 158 ); 159 160 $inline_extension_map = array( 161 'bbfr' => 'txt', 162 'ps' => 'ps', 163 'svg' => 'svg' 158 164 ); 159 165 … … 164 170 165 171 header('Content-Type: ' . $content_type); 166 if (array_key_exists($format, $extension_map)) 167 header('Content-Disposition: attachment; filename=export.' . $extension_map[$format]); 172 if (array_key_exists($format, $download_extension_map)) 173 header('Content-Disposition: attachment; filename=export.' . $download_extension_map[$format]); 174 else if (array_key_exists($format, $inline_extension_map)) 175 header('Content-Disposition: inline; filename=export.' . $inline_extension_map[$format]); 168 176 169 177 echo caca_export_string($cv, $format);
Note: See TracChangeset
for help on using the changeset viewer.