HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-31-18-78 6.17.0-1017-aws #17~24.04.1-Ubuntu SMP Tue May 26 21:09:53 UTC 2026 aarch64
User: ubuntu (1000)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /var/www/nclive/technc/upload_file_data.php
<?php 
header("Access-Control-Allow-Origin: *");
header('Content-Type: application/json');	
include 'config.php';

$query="SELECT up.id,ex.exam_name,up.title,up.upload_file FROM sp_exam_uploads as up LEFT JOIN sp_exam as ex on ex.exam_id=up.exam_id order by up.id desc";
$sql=$db->prepare($query);
$sql->execute();

while($row=$sql->fetch()){
$path="http://naukriconnect.com/technc/uploads/".$row['upload_file'];
$nestedData=array(); 
$nestedData["id"] =$row['id'];
$nestedData["exam_name"] =$row['exam_name'];
$nestedData["title"] =$row['title'];
$nestedData["file_path"] =$path;
$data[] = $nestedData;
}

echo json_encode($data);  // send data as json format
                                             
?>