Jump to content

Recommended Posts

I need to move temporary uploaded files (mostly images through a html form) from one domain on a webserver to another domain on the same webserver. What would be the best way to do this?

I mean, I could use php's FTP functions, but I guess that would be an overkill?

I can't use the full path to the domain, as this is not accepted by my hosting company.
Just manually copy and paste them over, it would be the easiest way I think.  Or I guess youcould copy the file with php functions, and then place them in another folder, somewhere else just like you would do when someone uploads them, then unlink the file that you had.
I can't manually copy and paste them, as they're part of a cms I wrote. The user can upload images through the cms. However, i'd like the images to be stored on the domain of his website, and not on the domain where the cms resides.

I can't do it manually cause it needs to happen rightaway. Immediately after the user has uploaded his/her image(s).
If you don't have direct access to the directory structure of the other domain, I would recommend you use the built in FTP functions. Also, if the other domain moves to a different web server, then your code wouldn't have to change.

Ken
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.