نسخة PHP () الوظيفة
❮ مرجع نظام ملفات PHPمثال
انسخ "source.txt" إلى "target.txt":
<?php
echo copy("source.txt","target.txt");
?>
التعريف والاستخدام
تقوم وظيفة copy () بنسخ ملف.
ملاحظة: إذا كان ملف to_file موجودًا بالفعل ، فسيتم استبداله.
بناء الجملة
copy(from_file, to_file, context)
قيمه المعامل
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() |
تفاصيل تقنية
قيمة الإرجاع: | صواب في النجاح ، خطأ في الفشل |
---|---|
إصدار PHP: | 4.0+ |
سجل التغيير في PHP: | PHP 5.3 - معلمة سياق مضافة |
❮ مرجع نظام ملفات PHP