Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 27 lines (21 sloc) 0.584 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
7e0242b @gabrielschulhof [combine.php] Prepend new variable $comment to output if the variable…
gabrielschulhof authored
11 if ( isset( $comment ) ) {
12 $contents .= $comment;
13 }
14
5bfc08b @eddiemonge Issue 2499: Some php improvements
eddiemonge authored
15 // Loop through the files adding them to a string
16 foreach ( $files as $file ) {
3688e8f minor changes to combine.php
Eddie Monge authored
17 $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
18 }
19
5bfc08b @eddiemonge Issue 2499: Some php improvements
eddiemonge authored
20 // Set the content type, filesize and an expiration so its not cached
3688e8f minor changes to combine.php
Eddie Monge authored
21 header('Content-Type: ' . $type);
22 header('Content-Length: ' . strlen($contents));
5bfc08b @eddiemonge Issue 2499: Some php improvements
eddiemonge authored
23 header('Expires: Fri, 01 Jan 2010 05:00:00 GMT');
24
25 // Deliver the file
26 echo $contents;
Something went wrong with that request. Please try again.