<?php include '../../../config/setup.php'; if (isset($_GET['image_name']) and $_GET['image_name'] != '') { $img_url = $_POST['image_name']; $image = basename($img_url); echo "{$image}"; $shotData = getShot_data($dbc, $image); if ($shotData) { $shot_name = $shotData['shotFileName']; inc_view($shot_name, $dbc); echo json_encode($shotData); } }
<?php require_once '../config/setup.php'; if (isset($_POST['image'])) { $url = $_POST['image']; $info = pathinfo($url); $image = $info['filename']; inc_view($image, $dbc); }