How To Copy File With Php Script Code



How To Copy File With Php Script Code
 (381) dminister a web business
How To Copy File With Php Script Code
Post Description:
Post Tags: how, to, copy, file, with, php, script, code
This Post Has Been Viewed 212 Times Since Sun Apr 20, 2008 8:48 pm Posted By tulas with 2 replies
How To Copy File With Php Script Code
im writing a php script today and i want to know how to copy a file from one directory to another using php

you see, i have all my images in the database and i need to move them to another website but the other site will be using a different directoyr name

sow can i copy files from one directory to another with php?

Leave Your Comments     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About How To Copy File With Php Script Code




:: 1 :: #51008 - Reply By wallpapers On Sun Apr 20, 2008 10:05 pm

copy()



just use the copy function

example:
<?php
$file = 'example.txt';
$newfile = 'example.txt.bak';

if (!copy($file, $newfile)) {
echo "failed to copy $file...n";
}
?>
:: 2 :: #51009 - Reply By ronals On Sun Apr 20, 2008 10:45 pm
tank yu i needed this