PHP bağlantısını kaldır() İşlevi
❮ PHP Dosya Sistemi ReferansıÖrnek
Bir dosyayı silin:
<?php
$file = fopen("test.txt","w");
echo fwrite($file,"Hello World. Testing!");
fclose($file);
unlink("test.txt");
?>
Tanım ve Kullanım
unlink() işlevi bir dosyayı siler.
Sözdizimi
unlink(filename, context)
Parametre Değerleri
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 |
Teknik detaylar
Geri dönüş değeri: | Başarıda DOĞRU, başarısızlıkta YANLIŞ |
---|---|
PHP Sürümü: | 4.0+ |
PHP Değişiklik Günlüğü: | PHP 5.0 - Bağlam parametresi eklendi |
❮ PHP Dosya Sistemi Referansı