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 |
टेक्निकल डिटेल
प्रतिलाभ की मात्रा: | सफलता पर सत्य, असफलता पर असत्य |
---|---|
पीएचपी संस्करण: | 4.0+ |
पीएचपी चेंजलॉग: | PHP 5.0 - संदर्भ पैरामीटर जोड़ा गया |
❮ पीएचपी फाइल सिस्टम संदर्भ