0

After running urlencode() on an URL, the function will convert spaces inside the URL to "+". However when i try to access the encoded URL, it's not working. Looks like my server only supports %20

How do i need to do to make my server supports + as encoded spaces ? Or how can i urlencode the spaces to %20 instead ?

urlencode("http://www.example.com/just some test.zip");

Result: http://www.example.com/just+some+test.zip

Winston Smith
  • 691
  • 2
  • 7
  • 11

1 Answers1

0

Use rawurlencode() instead of urlencode(),

difference between rawurlencode and urlencode

Community
  • 1
  • 1
蒋艾伦
  • 464
  • 1
  • 5
  • 16