Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   unlink and unset in PHP (https://www.warriorforum.com/programming/884101-unlink-unset-php.html)

rogerlegend 26th December 2013 01:55 AM

unlink and unset in PHP
 
Hi,

Please anyone tell me what is the difference between the functions unlink and unset?

Andrew H 26th December 2013 02:03 AM

Re: unlink and unset in PHP
 
People who post questions that clearly have done no research should have their sig link removed. If you posted that question into google instead you would have received an answer much easier... but then you wouldn't get your sig link exposure...

shahriyar 26th December 2013 02:51 AM

Re: unlink and unset in PHP
 
Quote:

Originally Posted by rogerlegend (Post 8815251)
Hi,

Please anyone tell me what is the difference between the functions unlink and unset?

unlink - Deletes a File (http://www.php.net/unlink)
unset - Destroys a Variable (http://www.php.net/unset)

PHP.net is your buddy.

lukewright 26th December 2013 03:18 AM

Re: unlink and unset in PHP
 
Hi shahriyar,

Thanks, I am new to php. I think php.net site is very helpful for me to learning. Is there any other sites to easily learn PHP ?

shahriyar 26th December 2013 03:33 AM

Re: unlink and unset in PHP
 
Quote:

Originally Posted by lukewright (Post 8815375)
Hi shahriyar,

Thanks, I am new to php. I think php.net site is very helpful for me to learning. Is there any other sites to easily learn PHP ?

Hello Luke, checkout these links =>
http://www.w3schools.com/

Very good video tutorials (free),
http://thenewboston.org/list.php?cat=11

lukewright 26th December 2013 03:43 AM

Re: unlink and unset in PHP
 
Thanks shahriyar. i think easy to learn w3schools.com site. thanks again for help...

shahriyar 26th December 2013 03:58 AM

Re: unlink and unset in PHP
 
Your are very welcome. Happy Holidays!

rogerlegend 26th December 2013 07:01 AM

Re: unlink and unset in PHP
 
Thank you very much shahriyar............

David Beroff 26th December 2013 09:46 AM

Re: unlink and unset in PHP
 
Quote:

Originally Posted by Andrew H (Post 8815257)
People who post questions that clearly have done no research should have their sig link removed. If you posted that question into google instead you would have received an answer much easier... but then you wouldn't get your sig link exposure...

Plus here we have sockpuppets with identical sigs used strictly to double the "conversation".

rogerlegend 27th December 2013 01:29 AM

Re: unlink and unset in PHP
 
hello,

permission denied - unlink()

unlink() is not working for me. any idea?

softwarewarden 27th December 2013 06:28 AM

Re: unlink and unset in PHP
 
Quote:

Originally Posted by rogerlegend (Post 8817420)
hello,

permission denied - unlink()

unlink() is not working for me. any idea?

you can only unlink a file that's owned by the process php is running as. if php is run as nobody (apache user) and the file is not owned by nobody youll get a permission denied error also some hosts might disable unlink.

shahriyar 27th December 2013 06:42 AM

Re: unlink and unset in PHP
 
Quote:

Originally Posted by rogerlegend (Post 8817420)
hello,

permission denied - unlink()

unlink() is not working for me. any idea?

Checkout these links,
http://forums.phpfreaks.com/topic/17...-on-directory/
http://stackoverflow.com/questions/1...ied-php-unlink

brutecky 27th December 2013 09:19 AM

Re: unlink and unset in PHP
 
unlink = deletes a file
unset = 'functionally' destroys a varible

lukewright 30th December 2013 05:37 AM

Re: unlink and unset in PHP
 
hi,

can we delete a folder using unlink()?

shahriyar 30th December 2013 05:48 AM

Re: unlink and unset in PHP
 
Quote:

Originally Posted by lukewright (Post 8824528)
hi,

can we delete a folder using unlink()?

No, use rmdir for that.
http://www.php.net/manual/en/function.rmdir.php


All times are GMT -6. The time now is 05:33 PM.