Search find and show folder of file

Hi,
I would like to know if it possible with php to search in folder a file, find it and it’s where I’m put in the corner, I know that I can’t execute it, so is it possible to open a window that show the file so I can click by my self to open it ?

Thank you !

Yes…

glob will give you the contents of a directory, so you can search for a file. You need to provide either the directories or logic for doing a recursive search and keep track of that.

1 Like

I should have asked in beginners, I have no ideas how to make this

How beginner are you? Do you have a localhost server set up to write code and test things?

I have learned by myself since few weeks. I have a mysql server so yes I can test things. I know some basic things about php. The function to search the file is ok but I’m stuck in the next step to make a window that show me the file to allow me to clic on it and open it in the specific software

have a database server doesn’t mean you have a web server that will interpret php files. The next part is just outputting html that links to that file.

1 Like

I guess i have that web thing too. I have already make thing that put csv files information in the database using php. What kind of html?
Is it this (picture) ?

edit :
I have made : < a href=“c:\temp\testfile.(file type)” > link
It works in web browser when I open the html page I have the link, but when I clic it makes me download the file I already have to can open it. Can I skip this and just make the file to load with the specific software ?

Depends on the type of file. You can look at different headers and have a new script that grabs the file and displays it, but default behavior is to download, depending on the file type.

1 Like
Sponsor our Newsletter | Privacy Policy | Terms of Service