Spaces in URL to %20?
Posted 27 August 2006 - 08:01 AM
However, sometimes the filename a user uploads has a space in it when sending to my email.
Thus, the url gets cut-off after the "my"
How do I make it so that if a user uploads a filename with space, it will still be a clickable link?
I tried urlencode but then I get something like http://domain.com/user/my+file.doc which is an invalid file. But http://domain.com/user/my%20file.doc works. How do I make it do that?
Posted 27 August 2006 - 08:05 AM
(Gone until 20 to November)
Posted 27 August 2006 - 01:00 PM
Posted 27 August 2006 - 02:30 PM
Since you didn't tell us what type of HTML tag you're trying to use, I will assume it's a "<a>" for this illustration:
In your case:
<?php echo '<a href="http://domain.com/user/my file.doc">'; ?>
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users