Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
<?php | ||
|
||
function yui($input){ | ||
exec("java -jar compressors/yuicompressor-2.3.5.jar --preserve-semi --line-break 150 --charset UTF-8 $input 2>&1", $out, $err); | ||
return $out; | ||
function yui($input, $path, $root){ | ||
$file = $root."compressors/yuicompressor-2.4.2.jar"; | ||
if (!file_exists($file)) die('Could not load file: '.$file); | ||
if (!file_exists($path)) die('Could not load file: '.$path); | ||
exec("java -jar ".$file." --preserve-semi -v --line-break 150 --charset UTF-8 ".$path."", $out, $err); | ||
return join($out, PHP_EOL); | ||
} | ||
|
||
?> |