Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 23 lines (18 sloc) 0.53 kb
1d0fd4a committing all the mobiley goodness.
scottjehl authored
1 <?php
5bfc08b @eddiemonge Issue 2499: Some php improvements
eddiemonge authored
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
4 {
5bfc08b @eddiemonge Issue 2499: Some php improvements
eddiemonge authored
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
6 exit;
7 }
8
9 $contents = '';
3688e8f minor changes to combine.php
Eddie Monge authored
10
5bfc08b @eddiemonge Issue 2499: Some php improvements
eddiemonge authored
11 // Loop through the files adding them to a string
12 foreach ( $files as $file ) {
3688e8f minor changes to combine.php
Eddie Monge authored
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
14 }
15
5bfc08b @eddiemonge Issue 2499: Some php improvements
eddiemonge authored
16 // Set the content type, filesize and an expiration so its not cached
3688e8f minor changes to combine.php
Eddie Monge authored
17 header('Content-Type: ' . $type);
18 header('Content-Length: ' . strlen($contents));
5bfc08b @eddiemonge Issue 2499: Some php improvements
eddiemonge authored
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.