Ok, first I know all about addslahes. I say that because I think that's where most people will send me and that's not it...
Ok, here's my issue. I'm generating a command line so I can shell out and exec zip to create a zip file. There may be other ways to do that, but I still would like to know how to do this.
The issue is that if the directory name looks like this
/home/user/directory with space & that in it/test directory's
and I add slashes it only escapes the ' like this:
/home/user/directory with space & that in it/test directory\'s
My question is what function would escape all the spaces and other special characters (like the &) I can write s replace function to do it, but I have no idea what all the characters I'd need to replace for would be (like & and maybe #, etc).
I just know there is a function for this but I can't find it. Remember I'm at the command line so htmlentites, etc won't do it...
Thanks,
Ross