I'm trying to create a web ui that will run some scripts on my server (Ubuntu gusty). I want the user to be able to select some files on the server via some sort of file select form. The selected file path would then be passed to a text field in another form. I envisage that the main form will have several fields including some of these file path fields. Next to these fields will be a 'select' button, which when clicked will popup the file select form. Once the user has chosen the necessary file, this value will be passed back to the appropriate text field on the main form. The ability to select multiple files would be an advantage. I'm not sure if I'm explaining this clearly. Happy to elaborate/clarify if necessary!

I have scoured this site & many others for something that will work for me, but not been able to find it. If someone could point me in the right direction it would be much appreciated.

Thanks in advance,

10 Years
Discussion Span
Last Post by sDJh

1) finding out files on the server:

readdir($dir)   //"."
readdir($dir)   //".."
echo $file."<br>";

or you save all files in a thumb.

2) Selecting and printing the stuff in a textbox is made in JS. Use something like textbox.value+="; "+selected.value
or you use the html-list with multiple-entries (don't get the tag right now) and name it

... name="files[]"

important are the brakets. In php you can then get all of the selected files.

I hope that helps. If not, then, well, just ask again ^^.


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.