Question

Okay so im working on this php image upload system but for some reason internet explorer turns my basepath into the same path, but with double backslashes instead of one; ie:

C:\\Documents and Settings\\kasper\\Bureaublad\\24.jpg

This needs to become C:\Documents and Settings\kasper\Bureaublad\24.jpg.

Was it helpful?

Solution

Use the stripslashes function.

That should make them all single slashes.

OTHER TIPS

Note that you may be running into PHP's Magic Quotes "feature" where incoming backslashes are turned to \\.

See http://us2.php.net/magic_quotes

Have you considered the stripslashes() function?

http://www.php.net/stripslashes

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top