Jump to content

delete files


jagguy

Recommended Posts

Here is an example of opening the temp directory and reading all sessions:

[code=php:0]
<?php
$session_dir = '../Tmp';
$handle = opendir($session_dir);
while (($file = readdir($handle)) != false) {
if (ereg("^sess", $file)) {
  $fhandle = file($session_dir.'/'.$file);
  printf("<pre>%s</pre>",print_r($fhandle[0],1));
}
}
?>
[/code]

Also, I think you mean unlink(). 
Link to comment
https://forums.phpfreaks.com/topic/29755-delete-files/#findComment-136616
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.