}
}
-?>
+echo <<<HEADER
/*
+----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
#define PHP_CLI_SERVER_MIME_TYPE_MAP_H
typedef struct php_cli_server_ext_mime_type_pair {
- const char *ext;
- const char *mime_type;
+\tconst char *ext;
+\tconst char *mime_type;
} php_cli_server_ext_mime_type_pair;
static const php_cli_server_ext_mime_type_pair mime_type_map[] = {
-<?php foreach ($extensions as $extension => $mime): ?>
- { "<?= addcslashes($extension, "\0..\37!@\@\177..\377") ?>", "<?= addcslashes($mime, "\0..\37!@\@\177..\377") ?>" },
-<?php endforeach ?>
- { NULL, NULL }
+
+HEADER;
+
+foreach ($extensions as $extension => $mime) {
+ echo "\t{ \"" .addcslashes($extension, "\0..\37!@\@\177..\377") . "\", \""
+ . addcslashes($mime, "\0..\37!@\@\177..\377") . "\" },\n";
+}
+
+echo <<<FOOTER
+\t{ NULL, NULL }
};
#endif /* PHP_CLI_SERVER_MIME_TYPE_MAP_H */
+
+FOOTER;