Hi!

For simplicty reasons I want to store an entire file path in a field. Since this is on windows, the \ in the path name causes problems. There might be also other SQL unfriendly characters in there. I once came across this and escape the string, but then when using stripslashes all slashes were gone, including the one that I needed. Back then I decided to circumvent the issue by constantly rebuilding the file path from scratch. This time I don't want to do that (too much work) and wonder how else I can escape/unescape a file path. I tried a
str_replace("\\", "/", $filepath)
but that appears to be too easy and also does not work as it returns an empty string.

Anyone has some expert advice? It is greatly appreciated.


David
_______________________________________________
New York PHP Community MySQL SIG
http://lists.nyphp.org/mailman/listinfo/mysql

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to