cac1eeae22dc47d321e63ceba90f984d5122f905
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.0.1pre / combine.php
1 <?php
2 // Get the filetype and array of files
3 if ( ! isset($type) || ! isset($files) )
4 {
5         echo '$type and $files must be specified!';
6         exit;
7 }
8
9 $contents = '';
10
11 // Loop through the files adding them to a string
12 foreach ( $files as $file ) {
13         $contents .= file_get_contents($file). "\n\n";
14 }
15
16 // Set the content type, filesize and an expiration so its not cached
17 header('Content-Type: ' . $type);
18 header('Content-Length: ' . strlen($contents));
19 header('Expires: Fri, 01 Jan 2010 05:00:00 GMT');
20
21 // Deliver the file
22 echo $contents;