summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2010-05-05 15:48:03 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2010-05-05 15:48:03 -0400
commitc44dc1b24b346aa5c51f4011f580972a1c5a1c38 (patch)
tree0d95bdfa29b17cbf037d591cde8c72a8cc4178a7
parentBetter upload script (diff)
downloadMovieStatistics-c44dc1b24b346aa5c51f4011f580972a1c5a1c38.tar.xz
MovieStatistics-c44dc1b24b346aa5c51f4011f580972a1c5a1c38.zip
Trim for total lines.
-rw-r--r--index.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.php b/index.php
index 504b39e..1fdc2e3 100644
--- a/index.php
+++ b/index.php
@@ -43,7 +43,7 @@ if ($running && $_GET["action"] == "terminate") {
if (!$running && $_GET["action"] == "start" && $_POST["forreal"] == "yeah") {
@exec("kill $pid");
file_put_contents("input.txt", $_POST['list']);
- file_put_contents("totalLines", (string)count(split("\n", $_POST['list'])));
+ file_put_contents("totalLines", (string)count(split("\n", trim($_POST['list']))));
@unlink("MovieStats.csv");
runInBackground("/home/zx2c4/opt/bin/python MovieSearchStats.py input.txt MovieStats.csv '".$_POST['email']."'");
$running = true;
@@ -97,4 +97,4 @@ Jaws
</form>
<?php endif; ?>
</body>
-</html> \ No newline at end of file
+</html>