What's Here?
- Members: 300,511
- Replies: 826,162
- Topics: 137,488
- Snippets: 4,420
- Tutorials: 1,148
- Total Online: 1,926
- Members: 94
- Guests: 1,832
|
Function to read or delete a file
|
Submitted By: Fcomax
|
|
|
Rating:
|
|
Views: 116 |
Language: PHP
|
|
Last Modified: July 3, 2009 |
Instructions: file_rd ($file, $mode)
$text = the text to read or delete
$mode = "read" or "delete"
//$mode:
// -read return the file content
// -delete to delete the file |
Snippet
<?php
function file_rd ($file, $mode) {
if ($mode == "read") {
return $file_text;
}
else if ($mode == "delete") {
return true;
}
else {
return 0;
}
}
?>
Copy & Paste
|
|
|
|