PHP copy() Funksie
❮ PHP-lêerstelselverwysingVoorbeeld
Kopieer "source.txt" na "target.txt":
<?php
echo copy("source.txt","target.txt");
?>
Definisie en gebruik
Die copy() funksie kopieer 'n lêer.
Let wel: As die to_file -lêer reeds bestaan, sal dit oorgeskryf word.
Sintaksis
copy(from_file, to_file, context)
Parameterwaardes
Parameter | Description |
---|---|
from_file | Required. Specifies the path to the file to copy from |
to_file | Required. Specifies the path to the file to copy to |
context | Optional. Specifies a context resource created with stream_context_create() |
Tegniese besonderhede
Terugkeerwaarde: | WAAR oor sukses, ONWAAR oor mislukking |
---|---|
PHP weergawe: | 4,0+ |
PHP Changelog: | PHP 5.3 - Bygevoeg konteks parameter |
❮ PHP-lêerstelselverwysing