file exists bug
Closed this issue · 0 comments
ChezRD commented
yes of course it can be rare event but it is...
file based on md5(any data) must be checked out in cycle like
do
{
$file_name = md5( data string );
}
while( file_exists( SITE_ROOT . '/files/' . $file_name ) );
one way or another you NEED to check exists of data when you use hash function like md5, sha1 and so on.