1234567891011121314151617181920212223242526 |
- <?php
- ini_set('display_errors', 1);
- ini_set("log_errors", 1);
- error_reporting(1);
- ini_set("error_log", "uploads-error.log");
- include "settings.php";
- include "include/init.php";
- include "include/functions.php";
- if ($token){
- foreach($_FILES as $file){
- $file_name = $file['name'];
- $file_tmp = $file['tmp_name'];
- $file_type = $file['type'];
- $file_size = $file['size'];
- @$file_ext = strtolower(end(explode('.', $file['name'])));
- move_uploaded_file($file_tmp, $file_name);
- $media_id[] = json_decode(uploadpic($file_name),true);
- unlink($file_name);
- }
- echo json_encode($media_id);
- }
- ?>
|