Skip to content
Newer
Older
100644 23 lines (18 sloc) 530 Bytes
1d0fd4a committing all the mobiley goodness.
scottjehl authored Sep 10, 2010
1 <?php
5bfc08b @eddiemonge Issue 2499: Some php improvements
eddiemonge authored Sep 21, 2011
2 // Get the filetype and array of files
3 if ( ! isset($type) || ! isset($files) )
d5a2ed2 @jblas Fixed 413 - Dev issue: our .htaccess file on the server is doing a 30…
jblas authored Nov 9, 2010
4 {
5bfc08b @eddiemonge Issue 2499: Some php improvements
eddiemonge authored Sep 22, 2011
5 echo '$type and $files must be specified!';
d5a2ed2 @jblas Fixed 413 - Dev issue: our .htaccess file on the server is doing a 30…
jblas authored Nov 9, 2010
6 exit;
7 }
8
9 $contents = '';
3688e8f minor changes to combine.php
Eddie Monge authored Jun 9, 2011
10
5bfc08b @eddiemonge Issue 2499: Some php improvements
eddiemonge authored Sep 22, 2011
11 // Loop through the files adding them to a string
12 foreach ( $files as $file ) {
3688e8f minor changes to combine.php
Eddie Monge authored Jun 9, 2011
13 $contents .= file_get_contents($file). "\n\n";
d5a2ed2 @jblas Fixed 413 - Dev issue: our .htaccess file on the server is doing a 30…
jblas authored Nov 9, 2010
14 }
15
5bfc08b @eddiemonge Issue 2499: Some php improvements
eddiemonge authored Sep 22, 2011
16 // Set the content type, filesize and an expiration so its not cached
3688e8f minor changes to combine.php
Eddie Monge authored Jun 9, 2011
17 header('Content-Type: ' . $type);
18 header('Content-Length: ' . strlen($contents));
5bfc08b @eddiemonge Issue 2499: Some php improvements
eddiemonge authored Sep 22, 2011
19 header('Expires: Fri, 01 Jan 2010 05:00:00 GMT');
20
21 // Deliver the file
22 echo $contents;
Something went wrong with that request. Please try again.