Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > PHP Forum

PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-13-2006, 01:19 PM
dirkfirst dirkfirst is offline
Programming Professional
 
Join Date: May 2006
Posts: 338
Rep Power: 11
dirkfirst is on a distinguished road
Default In this PHP Code

In this PHP code below, what does unlink do?

PHP Code:
$pass=0
$filename="./filename.txt"
if (!
file_exists($filename)) {$pass=1;} 

if (
$pass==1) {unlink($filename);} 
__________________
DirkFirst
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 07-13-2006, 05:19 PM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Age: 26
Posts: 5,980
Last Blog:
SAP, ERP and EDI
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

unlink means delete. In this code, it deletes a file of $filename

http://us2.php.net/manual/en/function.unlink.php
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
Don't hesitate to ask any questions that you have! Check out our ASCII Calculator!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-19-2006, 02:15 PM
Void's Avatar   
Void Void is offline
Programming Expert
 
Join Date: Jun 2006
Posts: 410
Rep Power: 11
Void is on a distinguished road
Default

that is correct. Not sure why they didn't just name the function "delete_file" or something.
__________________
Void
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginners Guide To PHP: *Tutorial* renlok PHP Tutorials 3 04-22-2008 03:20 PM
Where to Put PHP Code clookid PHP Tutorials 1 01-11-2007 08:44 PM


All times are GMT -5. The time now is 12:03 PM.

Contest Stats

satrian ........
jackluxford ........
gamiR ........
Fred@eisfi ........
MeTh0Dz|Reb0rn ........
gamers2000 ........
gaylo565 ........
chili5 ........
CharlesHutchsky ........
aurelABHR ........

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 67%

Ads