Web friendly file names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey all,

I have a file uploader module that allows users to upload documents and of course people are using all kinds of file names that are not web friendly.

I guess the best solution is to replace any non alphanumeric with maybe '_' the underscore? How does that sound?

Unfortunately, after 20+ years of coding I cannot get my brain around regular expressions to any decent level of proficiency, I know sad.

I'd like to hear other solutions for this problem, I am thinking of a regexp that replaces special chars with the underscore; sounds pretty robust and globally acceptable?

Opinions, witticisms, flames, quotations by famous débutantes?

(The last is optional)
--
====================================
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com
------------------------------------
Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux