وظيفة إلغاء ارتباط PHP ()
❮ مرجع نظام ملفات PHPمثال
حذف ملف:
<?php
$file = fopen("test.txt","w");
echo fwrite($file,"Hello World. Testing!");
fclose($file);
unlink("test.txt");
?>
التعريف والاستخدام
تعمل وظيفة إلغاء الارتباط () على حذف الملف.
بناء الجملة
unlink(filename, context)
قيمه المعامل
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to delete |
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream |
تفاصيل تقنية
قيمة الإرجاع: | صواب في النجاح ، خطأ في الفشل |
---|---|
إصدار PHP: | 4.0+ |
سجل التغيير في PHP: | PHP 5.0 - تمت إضافة معلمة السياق |
❮ مرجع نظام ملفات PHP