Re: [php-list] stripping spaces and other illegal chars out of filenames

2005-07-20 Thread Bob Sawyer
--- Patrick Bierans <[EMAIL PROTECTED]> wrote: > > $photo = "This is a photo of my dog, Skippy!.jpg"; > > $funkychars = array('\'', '.', ',', '$', '!', ' '); > > $photo = str_replace($funkychars, '_', $photo); > > $photo = strtolower($photo); > > N*! (*= add some more O's fo

Re: [php-list] stripping spaces and other illegal chars out of filenames

2005-07-19 Thread Patrick Bierans
>> I am working with a system that will have users uploading files,and I >> can't depend on them not using spaces and other things Unix doesnt' >> like in their file names (like ', ., etc). > $photo = "This is a photo of my dog, Skippy!.jpg"; > $funkychars = array('\'', '.', ',', '$', '!', ' '); >

Re: [php-list] stripping spaces and other illegal chars out of filenames

2005-07-19 Thread Bob Sawyer
--- Marian Briones <[EMAIL PROTECTED]> wrote: > I am working with a system that will have users uploading files,and I > can't depend on them not using spaces and other things Unix doesnt' > like in their file names (like ', ., etc). Run the filename variable through some REGEX or str_replace be

[php-list] stripping spaces and other illegal chars out of filenames

2005-07-19 Thread Marian Briones
I am working with a system that will have users uploading files,and I can't depend on them not using spaces and other things Unix doesnt' like in their file names (like ', ., etc). What's the best way to handle the upload? The variable is called photo I'm looking at osmething like: