Santanu
Santanu

Reputation: 8064

php file upload with server directory access

I am facing some typical problem from one of my project. A section in my project need a file up loader. The requirement is when an user clicks on the browse button, it will not only opens up the local directory, the already uploaded file directory need to accessed as well. In simple file uploader only the local directory can be accessed, I cannot able to fine any way out. If any one can help me in this issue, it will be great for me. Thanks in advance.

Upvotes: 0

Views: 756

Answers (1)

elo
elo

Reputation: 615

Is impossible to use to use the "file open dialog" / file uploader to browse files from server. You can create a dialog inside your browser with (html,css,php).

Is difficult to give an example, because I do not know your requirements. However you have to use two buttons, it will be easier:

  1. upload from your computer

  2. upload from the server

On click "upload from the server" , opens a window IN BROWSER (HTML+CSS) , that lists your folders and files on the server. To implement this , read here:

http://php.net/manual/en/function.scandir.php

http://php.net/manual/en/function.readdir.php

Upvotes: 3

Related Questions