Hi all,
I have wrote a script that getting folder properties.
What I want is to be able to browse my computer and to choose a folder and send it to the script I wrote.
It's not possible with <input type="file"> because it doesn't let me to choose directories.
any solutions?
Thanks
select folder
Moderator: General Moderators
yes but ...
I don't want to upload a dir just to be able to select one (from in my server) and send the path (only the path) to a script that will get the proper data.
wait. i think you're not being clear...and judas' avatar is bugging me for some reason. i think it's blinking too fast. i dislike gifs for avatars for this reason: a badly done gif gets irritating really fast.
anyway... i got the feeling you have a script on your computer
and you want itto filter a directory on a remote server.
if i'm right, your issue is this: you neeed to have yourself set as a server.....
put: $dir_to_check=$_GET['dir'];
into your script.
now modify it so it acts upon $dir_to_check
now.... call the page in your browser with :
page.php?dir=http://wwww.YourServer.domain/path/to/directory/
anyway... i got the feeling you have a script on your computer
and you want itto filter a directory on a remote server.
if i'm right, your issue is this: you neeed to have yourself set as a server.....
put: $dir_to_check=$_GET['dir'];
into your script.
now modify it so it acts upon $dir_to_check
now.... call the page in your browser with :
page.php?dir=http://wwww.YourServer.domain/path/to/directory/
I think you might want to look at the readdir() function: http://uk.php.net/manual/en/function.readdir.php
As you loop through a folder's contents, you'll also need an is_dir() test to check that the current item is in fact a folder and not a file.
As you loop through a folder's contents, you'll also need an is_dir() test to check that the current item is in fact a folder and not a file.