Ell20 Posted July 29, 2008 Share Posted July 29, 2008 Hi, Im having an issue with white space in a link, the link is: echo '<a href="download.php?file='.$directory.'">Download '.$file.' - '.strtoupper($ext).'</a>'; Inside the $directory variable is a name e.g David Beckham. The space between David and Beckham is causing the script to run incorrectly. I am 100% sure its the space causing the issue as I changed one instance to DavidBeckham and it worked. Does anyone have any ideas as to how to solve this? Thanks Link to comment https://forums.phpfreaks.com/topic/117226-solved-quick-question-white-space/ Share on other sites More sharing options...
corbin Posted July 29, 2008 Share Posted July 29, 2008 http://php.net/urlencode Link to comment https://forums.phpfreaks.com/topic/117226-solved-quick-question-white-space/#findComment-603034 Share on other sites More sharing options...
Ell20 Posted July 29, 2008 Author Share Posted July 29, 2008 Unfortunately this didnt work. Thanks for the help though Link to comment https://forums.phpfreaks.com/topic/117226-solved-quick-question-white-space/#findComment-603037 Share on other sites More sharing options...
Ell20 Posted July 29, 2008 Author Share Posted July 29, 2008 I fixed it, it was something to do with the download.php code, I used rawurlencode. Thanks for the heads up Link to comment https://forums.phpfreaks.com/topic/117226-solved-quick-question-white-space/#findComment-603051 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.