mainrotor
asked on
I need help developing an PHP application that browses for a file.
Hi Experts,
I need help writing a PHP application that browses for a file. I am using windows. I have XAMPP installed on my machine (I don't know if this is relevant or not).
How can I do this?
Thanks in advance,
mrotor
I need help writing a PHP application that browses for a file. I am using windows. I have XAMPP installed on my machine (I don't know if this is relevant or not).
How can I do this?
Thanks in advance,
mrotor
I need help writing a PHP application that browses for a file.Can you explain a bit more on exactly what you want to achieve.
Do you want to create a list of all files and folders that you can click on and navigate through
Or
Do you want to be able to find a specific file.
ASKER
Julian,
I want to be able to browse and find for a specific file.
Thanks,
mrotor
I want to be able to browse and find for a specific file.
Thanks,
mrotor
Do you need to search in one folder or recursively through a hierarchy?
If you know the folder you can do
If you need to do a recursive search then I would need to ask why you would want to do this. What is the use case - it is a lot of processing that could be avoided by potentially changing rules / configuration of how your files are ordered.
If you know the folder you can do
if (file_exists("somespecificfile.txt")) {
// process here
}
else {
// what to do if there is no file
}
If you need to do a recursive search then I would need to ask why you would want to do this. What is the use case - it is a lot of processing that could be avoided by potentially changing rules / configuration of how your files are ordered.
ASKER
Thanks Julian for your response,
I need to browse through a hierarchy.
I want to give the users the ability to browse through a file directory.
I need to browse through a hierarchy.
I want to give the users the ability to browse through a file directory.
How would they interact with this code - do you want to display the file system in a tree (GUI) ?
If so then people have already solved this problem. If you Google "PHP file browser" - you should find a number of samples that do this.
If so then people have already solved this problem. If you Google "PHP file browser" - you should find a number of samples that do this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ray,
thank you very much for providing some code.
I will test it and post my results.
thank you,
mrotor
thank you very much for providing some code.
I will test it and post my results.
thank you,
mrotor
Open in new window