Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

copy file

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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
fabrizzio
New php-forum User
New php-forum User
 
Posts: 10
Joined: Fri Dec 13, 2002 2:22 pm

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!
User avatar
Joan Garnet
Moderator
Moderator
 
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron