summaryrefslogtreecommitdiff
path: root/server.php
diff options
context:
space:
mode:
Diffstat (limited to 'server.php')
-rw-r--r--server.php59
1 files changed, 0 insertions, 59 deletions
diff --git a/server.php b/server.php
deleted file mode 100644
index 0683f12..0000000
--- a/server.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-
-if($_POST['number'])
-{
-$varNumber = $_POST['number'];
-
-$mySourceFile = fopen("source.txt", "r") or die("Unable to open file!");
-
-for ($i = 1; $i <= $varNumber; $i++) {
- fgets($mySourceFile);
-}
-
-if (!feof($mySourceFile))
- {
- echo fgets($mySourceFile);
-
- }
- else
- {
- echo "The end of the input file.";
- }
-fclose($mySourceFile);
-}
-
-
-if($_POST['number_trgt'])
-{
-$varNumber = $_POST['number_trgt'];
-
-$myTargetFile = fopen("target.txt", "r") or die("Unable to open file!");
-
-for ($i = 1; $i <= $varNumber; $i++) {
- fgets($myTargetFile);
-}
-
-if (!feof($myTargetFile))
- {
- echo fgets($myTargetFile);
- }
- else
- {
- echo "The end of the input file.";
- }
-fclose($myTargetFile);
-}
-
-
-if($_POST['postedit'])
-{
-$varData = $_POST['postedit'];
-echo $varData;
-
-$myFile = "testFile.txt";
-file_put_contents($myFile, $varData, FILE_APPEND);
-file_put_contents($myFile, PHP_EOL, FILE_APPEND);
-
-}
-
-?>