Is there any way a new image upload from a PHP form sent to directory a can be copied to directory b after it has been uploaded? In this case it’s not possible to alter the upload path itself or copy it during upload so I’m looking for some kind of automatic replication of new directory contents into another directory after the file has been uploaded.
Is there an automated service/script that can move the content of one directory on our server to another directory? We upload files to www.mysite.com/upload/thumb for example but need them to be moved automatically to www.mysite.com/cs/upload/thumb – is this possible without running a move_uploaded_file PHP script (I would prefer it to be done by the server because we use the same page for many different landing page functions).
do you look for
copy(http://php.net/manual/en/function.copy.php)?