What is the difference between the functions UNLINK
and UNSET?

Answers were Sorted based on User's Feedback



What is the difference between the functions UNLINK and UNSET? ..

Answer / subrat

unlink: is used to delete a file
unset is used to destroy an eralier declared variable

Is This Answer Correct ?    31 Yes 1 No

What is the difference between the functions UNLINK and UNSET? ..

Answer / ramse

Unset can be used for empty the value of variable or
contents of file but unlink destroy file.

Is This Answer Correct ?    12 Yes 2 No

What is the difference between the functions UNLINK and UNSET? ..

Answer / kirti

Function Unlink is used for deleting a file.
Function Unset is used for variable as to unset the variable
and free d memory allocated.

Is This Answer Correct ?    6 Yes 1 No

What is the difference between the functions UNLINK and UNSET? ..

Answer / adarsh katiyar

If you want delete some session data, you can use the
unset() or the session_destroy() function.

The unset() function is used to free the specified session
variable.

Is This Answer Correct ?    4 Yes 1 No

What is the difference between the functions UNLINK and UNSET? ..

Answer / ramtej

UNLINK function is used to delete a file,
UNSET function is used to free the specified session variable

Is This Answer Correct ?    3 Yes 0 No

What is the difference between the functions UNLINK and UNSET? ..

Answer / raju kumar

unlink used for delete file from directory and unset used
for destroy variable like session.

Is This Answer Correct ?    3 Yes 1 No

What is the difference between the functions UNLINK and UNSET? ..

Answer / vineet sharma

unset() function is to destroy the temporary declared variable.
Unlink function is used to remove the link from the file

Is This Answer Correct ?    1 Yes 0 No

What is the difference between the functions UNLINK and UNSET? ..

Answer / ramthiraviya

unlink():: is a function for file system handling.it will
simply file in context
unset():: is a function for variable management.it will make
a variable undefined

Is This Answer Correct ?    4 Yes 5 No

Post New Answer

More PHP Interview Questions

i start a new session with : session_start(); then i set some session variable like this : $_SESSION['name']=$_POST['name'];\ and some another variables. at bottom of page i set header to diffrent page : header('location: index.php'); exit(); now in new page (index.php i can't access to my session variables, like $_SESSION['name']) what's wrong ? thanks. here is my files : a.php ======================================== session_start(); require ('config.inc.php'); if(isset($_POST)) foreach($_POST as $v=>$k) { $items[$v]=$k; } $sql="SELECT * FROM members WHERE username='{$items['user']}' AND pass=MD5('{$items['Password']}') "; $res=mysql_query($sql); $row=mysql_fetch_assoc($res); if($row['username']) { $_SESSION['type']=$row['type']; $_SESSION['name']=$row['name']; $_SESSION['family']=$row['family']; $_SESSION['username']=$row['username']; $_SESSION['date']=$row['date']; } header('location: admin.php'); exit(); ====================================== admin.php ===================================== <?php session_start(); if(!isset($_SESSION['admin'])) { header('location: index.php'); exit(); } require ('config.inc.php'); ?> . . . =================================

5 Answers  


Why do we use csrf token?

0 Answers  


How does firefox manage cookies?

0 Answers  


what is the difference between mysql_fetch_array() and mysql_fetch_row()?

17 Answers   Google,


Which function can be used to exit from the script after displaying the error message?

0 Answers  






when ever the user logged in the database table the current registered date will be appeared

3 Answers  


Who is the father of PHP and explain the changes in PHP versions?

2 Answers   Rushmore Consultancy,


What is a model in php?

0 Answers  


How to find datatype of variable in php?

0 Answers  


What is lamp in php?

0 Answers  


Can we use get instead of post?

0 Answers  


Which is faster for or foreach php?

0 Answers  


Categories