recognizing spaces
| From: | caspar kennerdale | Date: | Fri, 16 May 2003 15:08:53 +0000 |
| Subject: | recognizing spaces | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147903@lists.php.net to get a copy of this message | ||
I am programming folder directory, and have an iput form where users can
name and then create a directory.
(At present this is on my windows machine at home)
I have created functions that creates an array of all folders in the current
directory, and then if you go into a folder, creates an array of files in
the folder. you you can view or delete the files.
When creating a folder, if the user inputs a name with a space in it - ie
"New Folder", then it creates, the folder and reads its contents
successfully.
However when I try to delete (using unlink) then I get a meaasge sying that
the fike doesnt not exist and recognizes the name "New" as opposed to "New
Folder".
So what I need to do is either recognize the space in the name, make the
adjustment to allow files to be deleted, or I need to prevent users using a
name with a space.
How would I recognize this space?
Thanks