Jump to content

spaces in a string


map200uk

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/53179-spaces-in-a-string/
Share on other sites

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:(

Link to comment
https://forums.phpfreaks.com/topic/53179-spaces-in-a-string/#findComment-262713
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.