Create core.php

This commit is contained in:
Eric Johansson (neku) 2015-02-04 20:21:26 +01:00
parent b067306baa
commit ba7d91c998

10
core.php Normal file
View File

@ -0,0 +1,10 @@
<?php
function save_file ($file, $name){
$rand_string = crc32(microtime(true).mt_rand(1000, 9000));
$path='/home/neku/www/files/';
$file_data=strip_tags($file);
$file_name=$rand_string.'_'.$name;
move_uploaded_file($file_data,$path.$file_name);
echo 'http://a.uguu.se/'.$file_name;
}
?>