RE: [PHP] choose upload folder
| From: | Vail, Warren | Date: | Tue, 21 Sep 2004 22:28:11 +0000 |
| Subject: | RE: [PHP] choose upload folder | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-197498@lists.php.net to get a copy of this message | ||
Marek is correct the behavior of the "browse" file selector is essentially a
client side thing, and not directly controllable from PHP. One difficulty
is how to know when a directory is clicked because it is selected, or
clicked because the operator wanted the directory expanded, because he
wanted to select a "directory" inside that one. If you can get past these
difficulties, you can always use the php function;
http://www.php.net/manual/en/function.dirname.php
to make sure that you are
working with the dirname portion of a path.
http://www.php.net/manual/en/function.is-dir.php
to make sure that the file
is a directory.
I am basically puzzled by what you are trying to do since you should not be
able to touch anything in the client's folders from your PHP server
application. Perhaps what you meant to provide was a way for the user to
choose a directory on your server? In which case, the <input type=file> will
not work at all. Where did you expect the user to select a directory/folder
from? Your server or the user's "browser" machine?
Warren Vail
-----Original Message-----
From: Marek Kilimajer [mailto:lists@kilimajer.net]
Sent: Tuesday, September 21, 2004 2:46 PM
To: Joerg P
Cc: php-general@lists.php.net
Subject: Re: [PHP] choose upload folder
Joerg P wrote:
> I have to be more specific:
> I dont want the file, I want the folder.
This happens on the client side, it has nothing to do with php.
You could possibly do it with signed java applets or activex scripts.
>
> Joerg
>
>
> Greg Donald wrote:
>
>> On Tue, 21 Sep 2004 23:05:17 +0200, Joerg P <superbla3000@gmx.net>
>> wrote:
>>
>>> I am building a script only for local use and would like the user to
>>> choose a specific folder on his computer, to catalogize all files in
>>> this folder.
>>>
>>> How do I let the user choose this folder?
>>
>>
>>
>> <input type="file">
>>
>>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php