Wij hebben een leuk systeempje lopen, maar hebben 1 probleem.
Zodra je een plaatje upload via upload.php geeft hij automatisch de code 600 mee, ipv 644
Hoe en waar kun je die chmod code nou precies invoeren?
905 views
if ($file_size <= $max_size) {
if ($file_size <= $sec_db_av) {
if (is_uploaded_file($_FILES['form_data']['tmp_name'])) {
$temp_name = $_FILES['form_data']['tmp_name'];
srand ((double) microtime() * 1000000);
$sec_unique_id = substr(md5(rand()),0,4);
$sec_img_name = $_SESSION['sess_admin_id'].'-'.$sec_unique_id.'.'.$sec_set_img_type;
$sec_img_path = $_SERVER["DOCUMENT_ROOT"].'/_img/'.$sec_dir_img_map.'/';
$lock = 1;
while (($lock<1000)&&(file_exists($sec_img_path.$sec_img_name))) {
srand ((double) microtime() * 1000000);
$sec_unique_id = substr(md5(rand()),0,4);
$sec_img_name = $_SESSION['sess_admin_id'].'-'.$sec_unique_id.'.'.$sec_set_img_type;
$sec_img_path = $_SERVER["DOCUMENT_ROOT"].'/_img/'.$sec_dir_img_map.'/';
$lock++;
}
$set_filename = $sec_img_name;
$url_location = '_img/'.$sec_dir_img_map.'/'.$sec_img_name;
$imagehw = GetImageSize($_FILES['form_data']['tmp_name']);
$imagew = $imagehw[0];
$imageh = $imagehw[1];
move_uploaded_file($temp_name,$sec_img_path.$sec_img_name);