By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,775 Members | 1,399 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,775 IT Pros & Developers. It's quick & easy.

copy in 2 directories

P: n/a
Hi all.

I've got a simple question.
Is it possible with the command "copy" upload a file via browser on two
different directories?

I use copy

copy("$file", "/directory1/$superdat_name")


Jun 14 '06 #1
Share this Question
Share on Google+
3 Replies

P: 5
No... I don't think so. Look in the PHP manual for $_FILES and is_uploaded_file()

Copy moves files around the file system.
Jun 14 '06 #2

P: n/a
copy($file, "/directory1/$superdat_name");
copy($file, "/directory2/$superdat_name");
// Just do copy 2 times.

Jun 14 '06 #3

P: n/a
Davide schreef:
copy("$file", "/directory1/$superdat_name")

In addition to the other reply in this thread, for uploaded files, you
should use the move_uploaded_file() function instead.
Jun 14 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.