mirror of
https://github.com/nokonoko/Uguu.git
synced 2024-01-06 13:35:15 +00:00
Update core.php
This commit is contained in:
parent
6e46f9b0a2
commit
d2ef06f2dc
3
core.php
3
core.php
@ -10,10 +10,13 @@ function save_file ($file, $name){
|
||||
echo 'http://a.uguu.se/'.$file_name;
|
||||
}
|
||||
Function gen_name ($in){
|
||||
//Check so the file doesn't exist, and generate random prefix
|
||||
while(file_exists('/home/neku/www/files'.$name.'_'.$in)){
|
||||
$chars = 'abcdefghijklmnopqrstuvwxyz';
|
||||
$name = '';
|
||||
for ($i = 0; $i < 6; $i++) {
|
||||
$name .= $chars[mt_rand(0, 25)];
|
||||
}
|
||||
}
|
||||
return $name.'_'.$in;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user