Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!

Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > PHP / mySQL

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 12-06-2017, 03:40 AM   #1
travelowebseo
Registered User
 
Join Date: Sep 2017
Posts: 123
What's the difference between unset() and unlink()

What's the difference between unset() and unlink()
travelowebseo is offline   Reply With Quote

Old 02-19-2018, 08:41 PM   #2
aesthetiqclinic
Registered User
 
Join Date: Jan 2018
Posts: 97
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.
__________________
Laser Hiar Removal
aesthetiqclinic is offline   Reply With Quote
Old 02-25-2018, 01:21 AM   #3
smmexpertss
Registered User
 
Join Date: Sep 2015
Location: UK
Posts: 625
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.
smmexpertss is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the difference between the functions UNLINK and UNSET? david_ho Search Engine Optimization 1 04-15-2016 05:15 AM
What is the difference between the functions unlink and unset? chinmay.sahoo PHP / mySQL 3 08-24-2015 10:53 PM


All times are GMT -7. The time now is 01:09 PM.


Powered by vBulletin Copyright © 2013 vBulletin Solutions, Inc.