file_exists(), is_file() & is_dir() with spaces?

June 26th, 2007
No Gravatar

Why won’t file_exists(), is_file(), is_dir() return true if the file or directory has a space in it?

I spent a few hours trying all kinds of ways to make this work. I finally settled on using $file->setName(”safe”); from PEAR’s HTTP_Upload class which makes the uploaded file “safe”.

What’s safe?

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


Was this post useful to you? Let me know, buy me a beer!
Alternatively, if you're feeling impecunious, you may like to subscribe to my RSS feed, or see other articles in the PHP category.

Leave a Reply