diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-07-21 13:48:16 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-07-21 13:48:16 +0200 |
commit | 8a7bd7ec70868a5f027bc0bd26ae45a6491f21d2 (patch) | |
tree | 5fe82763511c81a02b34ba6c5011b704eb0e23de | |
parent | 5bb9c57fdbfe6ee69c0ffaad52b9d4259a6b97f5 (diff) | |
download | bin-8a7bd7ec70868a5f027bc0bd26ae45a6491f21d2.tar.gz bin-8a7bd7ec70868a5f027bc0bd26ae45a6491f21d2.tar.xz |
urldecode: don't read the script itself
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-x | urldecode | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,10 +1,12 @@ #!/usr/bin/php <?php -if (count($argv) == 0) { +if (count($argv) == 1) { echo urldecode(file_get_contents("php://stdin")); } else { - foreach ($argv as $arg) { + $args = $argv; + unset($args[0]); + foreach ($args as $arg) { echo urldecode(file_get_contents($arg)); } } |