Hey ya guys.
I'm building this CMS panel and one of the things I would like to do for the blog section is have a button that will fill out an input field with the path or what not of a file on the server.
While I know I could just do a simple upload browse button for a pic, most of the ones I would be using are already on the server and would like to reduce the file redundancy.
Example: New post> Input all other information > click on browse button, but looks in the server rather than the local machine.
Possible?
Browse button for server files?
Moderator: General Moderators
- angelicodin
- Forum Commoner
- Posts: 81
- Joined: Fri Nov 13, 2009 3:17 am
- Location: Oregon, USA
Re: Browse button for server files?
Yes - but not through the <input type = "file"> control. You want a file browser for the server side, so you'll have to use glob(), and realpath(), and maybe some other functions that can give you file lists from the server.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
- angelicodin
- Forum Commoner
- Posts: 81
- Joined: Fri Nov 13, 2009 3:17 am
- Location: Oregon, USA
Re: Browse button for server files?
~sigh~ didn't think it was gonna be easy.
On the bright side, if I come up with a good solution I'll post it here in case someone else could make use of it, or make it better ;p
On the bright side, if I come up with a good solution I'll post it here in case someone else could make use of it, or make it better ;p