0) { fprintf($outfp, "%s", str_replace($from, $to, $buffer)); } else { echo str_replace($from, $to, $buffer); } } else { echo $buffer; } } if (strlen($outf) > 0) fclose($outfp); fclose($ourfp); } else { $arg = str_replace("*", "", str_replace("?", "", $argv1)); if (strlen($arg) == strlen($argv1)) echo $argv1 . " does not exist."; } } function secondchoice() { global $argv1, $argv2, $argv3, $argv4, $argv5; $here1 = ""; $rec = ""; if (file_exists("phpcmdparams-are.here1")) { $vourfp = fopen("phpcmdparams-are.here1", "r"); if (strlen($argv1) == 0) { $argv1 = fgets($vourfp, 4096); while (($rec = fgets($vourfp, 4096)) !== false) { $here1 .= $rec; } } fclose($vourfp); $argv1x = str_replace("\n", "", str_replace("\r", "", str_replace("\r\n", "", $argv1))); $argv1 = $argv1x; if (strlen($here1) == 0) { unlink("phpcmdparams-are.here1"); } else { $wvourfp = fopen("phpcmdparams-are.here1", "w"); fprintf($wvourfp, "%s", $here1); fclose($wvourfp); } } if (file_exists("phpcmdparams-are.here2")) { $vourfp = fopen("phpcmdparams-are.here2", "r"); $argv2 = fgets($vourfp, 4096); fclose($vourfp); $argv1x = str_replace("\n", "", str_replace("\r", "", str_replace("\r\n", "", $argv2))); $argv2 = $argv1x; } if (file_exists("phpcmdparams-are.here3")) { $vourfp = fopen("phpcmdparams-are.here3", "r"); $argv3 = fgets($vourfp, 4096); fclose($vourfp); $argv1x = str_replace("\n", "", str_replace("\r", "", str_replace("\r\n", "", $argv3))); $argv3 = $argv1x; } if (file_exists("phpcmdparams-are.here4")) { $vourfp = fopen("phpcmdparams-are.here4", "r"); $argv4 = fgets($vourfp, 4096); fclose($vourfp); $argv1x = str_replace("\n", "", str_replace("\r", "", str_replace("\r\n", "", $argv4))); $argv4 = $argv1x; } if (file_exists("phpcmdparams-are.here5")) { $vourfp = fopen("phpcmdparams-are.here5", "r"); $argv5 = fgets($vourfp, 4096); fclose($vourfp); $argv1x = str_replace("\n", "", str_replace("\r", "", str_replace("\r\n", "", $argv5))); $argv5 = $argv1x; } } ?>