Page 1 of 1

Browse to file then fopen

Posted: Thu Jul 21, 2005 9:08 pm
by littlejon
I load a csv into a mysql db and use a properties file to store the file name. The problem is that if the file is somewhere else, like my thumb drive rather than my harddrive, I have to edit the properties file before running my program.

I'd like to be able to start my php program, browse to the file, select it to capture the file name and then do fopen on that selected file and continue with my code. I've looked for file browsing scripts and code but I don't know of any that allow me to select a file and use that file name in my code. Any ideas or leads would be appreciated.

Thanks,

Posted: Thu Jul 21, 2005 9:40 pm
by Burrito
you can't actually "browse" the file system on the server. You can create a list of files on the server using glob() or opendir() and then list them out on a web page, but as for just "browsing", it can't be done...