Carson Myers
Carson Myers

Reputation: 38564

Is it possible to build a remote file manager in PHP?

Is it possible to do file operations from a script running on a different server than the files being operated on? That is, upload, move, rename, delete, create new, modify, etc.

How would I go about doing this?

Upvotes: 2

Views: 1472

Answers (6)

WeSee
WeSee

Reputation: 3762

There is a fantastic remote filesystem manager available.

Just have a look at Flysystem.

It requires PHP 5.4 or higher.

Upvotes: 0

Sun Junwen
Sun Junwen

Reputation: 1098

See http://rosefinch.sf.net

A open source php file manager.

Upvotes: 0

knittl
knittl

Reputation: 265201

yes, this is either possible through php’s ftp functions or the native file system functions.

i wrote one myself (myftphp <-- advertisment :D)

using the native filesystem functions there are always restrictions on permission management, but for managing files in a public directory it’s perfect

Upvotes: 0

Alan Haggai Alavi
Alan Haggai Alavi

Reputation: 74222

As far as I know, it can be done only by logging into the shell via the remote script and then executing the commands from within the shell, or maybe by using FTP from the remote script.

Another method would be:

Create scripts in the server which will accept parametres (POST data) and do operations based on the arguments that are supplied to it.

Upvotes: 1

Anthony
Anthony

Reputation: 37065

You are basicallly describing WebDAV, which was created so that write-methods like those found in ftp could be done over HTTP.

I imagine it would be tricky to make a non-http file manager with PHP that was save and reliable.

There are several libraries for adding making WebDAV feasible in PHP, not that are core or standard extensions yet, though.

Upvotes: 0

Greg
Greg

Reputation: 321618

One way do to it would be through FTP.

Upvotes: 1

Related Questions