Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
minor changes to combine.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddie Monge authored and Eddie Monge committed Jun 9, 2011
1 parent f8957ba commit 3688e8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
17 changes: 8 additions & 9 deletions combine.php
@@ -1,18 +1,17 @@
<?php

if (!isset($type) || !isset($elements))
if ( ! isset($type) || ! isset($elements) )
{
echo "\$type and \$elements must be specified!";
echo '$type and $elements must be specified!';
exit;
}

$contents = '';
reset($elements);
while (list(,$element) = each($elements)) {
$contents .= "\n\n" . file_get_contents($element);

foreach ( $elements as $file ) {
$contents .= file_get_contents($file). "\n\n";
}

header("Content-Type: " . $type);
header("Content-Length: " . strlen($contents));
echo $contents;
?>
header('Content-Type: ' . $type);
header('Content-Length: ' . strlen($contents));
echo $contents;
3 changes: 1 addition & 2 deletions js/index.php
Expand Up @@ -30,5 +30,4 @@
'jquery.mobile.init.js'
);

include('../combine.php');
?>
include('../combine.php');

0 comments on commit 3688e8f

Please sign in to comment.