Browse to file then fopen

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
littlejon
Forum Newbie
Posts: 1
Joined: Thu Jul 21, 2005 9:00 pm

Browse to file then fopen

Post 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,
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post 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...
Post Reply