Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
Node is saved as draft in My Content >> Draft
  • PHP Copy Files

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 2
    Comment on it

    How to open and read PHP files have been discussed in blog:
    http://findnerd.com/list/view/How-to-open-and-read-files-with-PHP/3157/

    Now,we will discuss about copying a php file.

    In php,we can Copy files from source to destination. Function used :

    copy(used in PHP 4, PHP 5)

    It takes two parameters as input: 1.Destination path 2.Source Path

    Syntax:

    copy (string $source, string $destination);

    NOTE:If the destination file exists it will be overwritten. It returns true on success and false on failure.

    Can be explained with an example:

    (!copy($source_file, $destination_file)) { echo "failed to copy $file...\n"; } ?>

    copy php source destination

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: