diff options
author | Luke Bratch <luke@bratch.co.uk> | 2017-08-16 20:28:48 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2017-08-16 20:28:48 +0100 |
commit | 581d69f4cc57c9acf51913119d76cae19fdfeaac (patch) | |
tree | 82b36d310b8c1f1e50567457f541520cb4928206 /upload_file.php | |
parent | 0897380ee3cf5d06279e6790bfc4875a03bc8925 (diff) |
URL encode the URL with rawurlencode() when using it
Diffstat (limited to 'upload_file.php')
-rwxr-xr-x | upload_file.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/upload_file.php b/upload_file.php index f1ed597..acf8c89 100755 --- a/upload_file.php +++ b/upload_file.php @@ -48,7 +48,7 @@ if ($_FILES["file"]["error"] > 0) { } else { move_uploaded_file($_FILES["file"]["tmp_name"], "./" . $_FILES["file"]["name"]); echo "Uploaded: " . $_FILES["file"]["name"] . "<br>"; - $fileurl = "$url" . $_FILES["file"]["name"]; + $fileurl = "$url" . rawurlencode($_FILES["file"]["name"]); echo "URL: <a href=\"$fileurl\">$fileurl</a><br>"; echo "Size: " . size_readable($_FILES["file"]["size"], null, "bi"); if (isset($posturl)) { |