copy file

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

User avatar
fabrizzio
New php-forum User
New php-forum User
Posts: 10
Joined: Fri Dec 13, 2002 2:22 pm

copy file

Postby fabrizzio » Mon Dec 30, 2002 5:05 pm

another one. can i copy a file to another url? i don't want to upload with a form i want to copy the files. i know that since php ver 4.3 i can do it but i have php 4.2.2

fabrizzio

User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Postby Joan Garnet » Tue Dec 31, 2002 6:52 am

It should work since php3 -->

Code: Select all

if (!copy( $file, $dir )) {
    print ("failed to copy $file...<br>\n");
}else{
    print ("$file succesfully copied into $dir");
}


bye!


Return to “PHP coding => General”

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 3 guests