Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   PHP / mySQL (http://siteownersforums.com/forumdisplay.php?f=10)
-   -   What's the difference between unset() and unlink() (http://siteownersforums.com/showthread.php?t=205896)

travelowebseo 12-06-2017 04:40 AM

What's the difference between unset() and unlink()
 
What's the difference between unset() and unlink()

aesthetiqclinic 02-19-2018 09:41 PM

In PHP unlink() is a function for file system handling, unlink() is used to delete files. Suppose you have uploaded a file and wants to delete this file through the coding then unlink() function is used to delete the file.

unset() is a function for variable management. It will make a variable undefined. Or we can say that unset() is used to null out the value of a given variable. OR Unset () is used to destroy a variable in PHP. In can be used to remove a single variable, multiple variables, or an element from an array.

smmexpertss 02-25-2018 02:21 AM

unset() destroys the specified variables. unlink is a function for file system handling, unlink is used to delete files. ... For example you have uploaded a file, and you have to delete that file from the php code then you can use unlink function to delete that file. While unset is used for variable and array.


All times are GMT -7. The time now is 06:22 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.