minor changes to combine.php

This commit is contained in:
Eddie Monge 2011-06-09 01:51:37 -07:00
parent f8957baec7
commit 3688e8fa92
2 changed files with 9 additions and 11 deletions

View file

@ -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;

View file

@ -30,5 +30,4 @@ $elements = array(
'jquery.mobile.init.js'
);
include('../combine.php');
?>
include('../combine.php');