Page 1 of 1

Browse button for server files?

Posted: Tue Feb 23, 2010 2:21 pm
by angelicodin
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?

Re: Browse button for server files?

Posted: Tue Feb 23, 2010 5:05 pm
by pickle
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.

Re: Browse button for server files?

Posted: Tue Feb 23, 2010 5:43 pm
by angelicodin
~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