Re: Web friendly file names
| From: | Skip Evans | Date: | Wed, 03 Jun 2009 17:00:07 +0000 |
| Subject: | Re: Web friendly file names | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-293548@lists.php.net to get a copy of this message | ||
Oh, of course that makes sense, and I suppose the PHP move_uploaded_file() function has no problem with weird and crappy file names?
Skip
Eddie Drapkin wrote:
Well, erm, no. I'd store the filename, etc. as-is in the database, and then link it with urlencode() and you should be able to serve a file called "A non friendly name!" site.com/A%20non%20friendly.. <http://site.com/A%20non%20friendly..>.. and a modern webserver should be fine with that, and even most browsers will allow you to type site.com/A <http://site.com/A> non friendly... without the url escaped characters and it will url escape them in the request. The only issue is that the urlencoded special characters are a lot uglier, which may or may not be a consideration for you. On Wed, Jun 3, 2009 at 12:39 PM, Skip Evans <skip@bigskypenguin.com <mailto:skip@bigskypenguin.com>> wrote:-- ==================================== 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