Subversion Repositories cheapmusic

Rev

Rev 15 | Rev 65 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15 Rev 20
Line 14... Line 14...
14
  $text = file_get_contents($file);
14
  $text = file_get_contents($file);
15
  echo $text;
15
  echo $text;
16
  
16
  
17
// Convert to JSON to read the status.
17
// Convert to JSON to read the status.
18
  $obj = json_decode($text);
18
  $obj = json_decode($text);
19
  // If the process is finished, delete the file.
19
// If the process is finished, delete the file.
20
  if ($obj->percent == 100) {
20
  if ($obj->percent == 100) {
21
    unlink($file);
21
    @unlink($file);
22
  }
22
  }
23
}
23
}
24
else {
24
else {
25
  echo json_encode(array("percent" => null, "message" => "File Not Found"));
25
  echo json_encode(array("percent" => null, "message" => "File Not Found"));
26
}
26
}