Skip to content
Browse files

Added an unlink to remove the temp file after parsing

  • Loading branch information...
1 parent 4b77d27 commit e927bd119c136c7937faa3ef72517b52cc58ef13 @davglass committed Dec 15, 2008
Showing with 1 addition and 2 deletions.
  1. +1 −2 index.php
View
3 index.php
@@ -14,16 +14,15 @@
if ($_POST['source']) {
$str = $_POST['source'];
$tempName = tempnam(sys_get_temp_dir(), 'jslint-');
- $tempNameOut = tempnam(sys_get_temp_dir(), 'jslint-');
file_put_contents($tempName, stripslashes($str));
- chmod($tempName, 0755);
}
if ($tempName) {
$cmd = $java.' -jar '.escapeshellarg($rhino).' '.escapeshellarg($jslint).' '.escapeshellarg($fulljslint).' '.escapeshellarg($tempName).' 2>&1'; //This redirects error and out to out so we get it..
$out = exec($cmd);
echo($out);
+ unlink($tempName);
} else {
$json->error = new stdclass();

0 comments on commit e927bd1

Please sign in to comment.
Something went wrong with that request. Please try again.