copy

(PHP 3, PHP 4 >= 4.0.0)

copy -- Kopiert eine Datei

Beschreibung

int copy (string source, string dest)

Die Funktion copy() kopiert eine Datei. Sie gibt TRUE zurück, wenn der Kopiervorgang erfolgreich war, andernfalls FALSE.

Beispiel 1. copy()


if (!copy ($file, $file.'.bak')) {
    print ("failed to copy $file...<br>\n");
}
      

Siehe auch: rename().