$value) { $json[$key]['image'] = '//'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].'/images/'.$value['image']; } echo json_encode($json); die(); } if($uri == '/'){ header('Location: /index.html'); die(); }