map200uk Posted May 27, 2007 Share Posted May 27, 2007 i only just realised in testing, if a string has spaces it causes problems as the string may be say \vault\test title bla bla.mp3 so when i have the link with ?path=path the whole string is not passed due to the spaces, and urlencode adds + + which when the link is clicked will cause the system to not be able to find the file echo "<a href=streamfile.php?action=stream&&path=http://$_SERVER[sERVER_ADDR]'$result[playpath]'&type=pls>Stream file</a></td>"; how could i fix this so the full string including spaces is passed? i cant remember i thought it was something to do with quotes or using \ ? thanks Quote Link to comment https://forums.phpfreaks.com/topic/53179-spaces-in-a-string/ Share on other sites More sharing options...
trq Posted May 27, 2007 Share Posted May 27, 2007 Dont have spaces in file names. Replace them with underscores or something during the upload process. Quote Link to comment https://forums.phpfreaks.com/topic/53179-spaces-in-a-string/#findComment-262712 Share on other sites More sharing options...
map200uk Posted May 27, 2007 Author Share Posted May 27, 2007 thorpe, the files arent uploaded so its not an issue, the files are catalogued off files on the local drives/network drives, isnt it possible to handle spaces and echo the full string including spaces? In an ideal world yea, no spaces in filenames-sadly there are:( if you could point me in the right direction, much appreciated am i right thinking something to do with \ and quotes? Or completely wrong:( Quote Link to comment https://forums.phpfreaks.com/topic/53179-spaces-in-a-string/#findComment-262713 Share on other sites More sharing options...
AndyB Posted May 27, 2007 Share Posted May 27, 2007 http://ca.php.net/manual/en/function.rawurldecode.php and its companion rawurlencode Quote Link to comment https://forums.phpfreaks.com/topic/53179-spaces-in-a-string/#findComment-262715 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.