Warning: unlink(D:/test_folder/hello.txt): Permission denied in ...
To suppress this warning notice displayed to the browser, we can use the unlink() function with the prefix @ symbol.
PHP unset()
unset() is used to make the target file to be empty on removing its content, meaning that, the purpose is for clearing content instead of deleting file permanently from the folder. unset() not only used to clear the file content, but also used for undoing initialization of a PHP variable, and there by makes it empty.
File name : index.php
<?php
$welcome_text = "Welcome to itechtuto";
unset($welcome_text);
if(isset($welcome_text)) {
echo "<strong>My welcome text is: </strong><i>" . $welcome_text . "</i>";
} else {
echo "<strong>My welcome text is: </strong> empty";
}
?>